The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
NAME
    Perl::Build::Git - Convenience extensions for Perl::Build for bulk git
    work

VERSION
    version 0.001000

SYNOPSIS
    This is something that might be useful to call in a git bisect runner

        use Perl::Build::Git;
        my $man         = [qw( man1dir man3dir siteman1dir siteman3dir  )];
        my $no_man_opts = [ map { '-D' . $_ . '=none' } @{$man} ];
        my $install = Perl::Build::Git->install_git(
                persistent => 1,
                preclean   => 1,
                cache_root => '/tmp/perls/',
                git_root   => '/path/to/git/checkout',
                configure_options => [
                    '-de',               # quiet automatic
                    '-Dusedevel',        # "yes, ok, its a development version"
                    @{$no_man_opts},     # man pages are ugly
                    '-U versiononly',    # use bin/perl, not bin/perl5.17.1
                ],
        );
        $install->run_env(sub{
                # Test Case Here
                exit 255 if $failed;
        });
        exit 0;

    "persistent = 1" is intended to give each build its own unique
    directory, such as

        /tmp/perls/v5.17.10-44-g97927b0/

    So that if you do multiple bisects, ( for the purpose of testing which
    incarnation of "perl" some module fails in ), testing against a "perl"
    that was previously tested against in a previous bisect should return a
    cached result, greatly speeding up the bisect ( at the expense of disk
    space ).

METHODS
  install_git
        Perl::Build::Git->install_git(
            cache_root => '/some/path',
            git_root   => '/some/path/to/perl/git',
            persistent => bool,
            preclean   => bool,
            quiet      => bool,
            log_output => filehandle,
            log        => coderef,
        );

    *   "cache_root"

        path. This should be a path to an existent base working directory to
        install multiple "perl" installs to

        Perl builds will either be in the form of

            <cacheroot>/<tag>-g<sha1abbrev>

        or

            <cacheroot>/<tag>-g<sha1abbrev>-<SUFFIX>

        depending on "persistent"

    *   "git_root"

        path.

        This should be a path to an existing "perl" "git" checkout.

    *   "persistent"

        "bool".

        Whether to make the build directory persistent or not. Persistent
        directories can be optimistically re-used, while non-persistent ones
        can not.

        Non Persistent directories also have a random component added to
        their path, and implied cleanup on exit.

        Default is NOT PERSISTENT

    *   "preclean"

        "bool".

        Whether to execute a pre-build cleanup of the git working directory.

        This at present executes a mash of "git checkout", "git reset" and
        "git clean".

        Default is PRE-CLEAN GIT TREE

    *   "quiet"

        "bool".

        If specified, the default method for "log" is a no-op.

        The default is NOT QUIET

    *   "log_output"

        "filehandle".

        Destination to write log messages to.

        Default is *STDERR

    *   "log"

        "coderef". Handles dispatch from logging mechanisms, in the form

            $logger->( $color_spec , @message );

        where color_spec is anything that "Term::ANSIColor::colored"
        understands.

            $logger->( ['red'], "this", "is", "a" , "test" );

        Default implementation writes to "log_output" formatting @message
        via "Term::ANSIColor".

AUTHOR
    Kent Fredric <kentfredric@gmail.com>

COPYRIGHT AND LICENSE
    This software is copyright (c) 2013 by Kent Fredric
    <kentfredric@gmail.com>.

    This is free software; you can redistribute it and/or modify it under
    the same terms as the Perl 5 programming language system itself.