The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Perl::Repository::APC - Class modelled after All Perl Changes

SYNOPSIS

  use Perl::Repository::APC;
  my $apc = Perl::Repository::APC->new("/path/to/APC");

DESCRIPTION

The constructor new() takes a single argument, the path to the APC. The resulting object has the following methods:

  • get_to_version($branch,$patch)

    $branch is one of perl, maint-5.004, maint-5.005, maint-5.6, maint-5.8, or any other branch that is part of the APC. $patch is a patch number that must also be available in the local copy of APC. The return value is the perl version that this patch was leading to. This is at the same time the directory name under the APC directory that leads to the patch. E.g.

        $apc->get_to_version("perl",7100);         # returns "5.7.1"
        $apc->get_to_version("maint-5.005",1656);  # returns "5.005_01"

    Dies if $patch is not part of $branch.

  • get_from_version($branch,$patch)

    Like above, but returns the perl version this patch is building upon. E.g.

        $apc->get_to_version("perl",7100);         # "5.7.0"
        $apc->get_to_version("maint-5.005",1656);  # "5.005_00"
        $apc->get_from_version("perl",12823);      # "5.7.2"
        $apc->get_from_version("maint-5.6",12823); # "5.6.1"
  • patch_range($branch,$lower,$upper)

    $lower and $upper are two patch numbers, $branch is a perforce branch name (see get_to_version() for a description). This method returns an reference to an array containing all patchnumbers on $branch starting with the lower boundary (or above, if the lower boundary does not exist) and ending with the upper boundary (or below, if the upper boundary does not exist). E.g.

        $apc->patch_range("perl",0,999999999); # returns all patches on the trunk
        $apc->patch_range("perl",17600,17700); # 
  • version_range($branch,$lower,$upper)

    As above but instead of returning an array of patches, it returns the accordant array of perl versions (i.e. directories below APC). E.g.

        $apc->version_range("perl",17600,17700); # returns ["5.8.0","5.9.0"]
  • tarball($version)

    $version is a perl version as labeled in the APC, e.g. "5.005_00". The return value is the name of the perl tarball containing that version. E.g.

        $apc->tarball("5.005_00"); # "perl5.005.tar.gz"
        $apc->tarball("5.6.0");    # "perl-5.6.0.tar.gz"
        $apc->tarball("5.004_75"); # "perl5.005-beta1.tar.gz"

    Dies if the argument does not lead to an existing directory in the APC.

  • first_in_branch($branch)

  • next_in_branch($version)

    $branch is a perforce branch (see get_to_version() for a description). $version is a perl version as labeled in the APC, e.g. "5.005_00".

        $apc->first_in_branch("maint-5.004"); # returns "5.004_00"
        $apc->first_in_branch("perl");        # returns "5.004_50"
        $apc->next_in_branch("5.6.0");        # returns "5.7.0"

    Next_in_branch returns undef for the last version of a branch. Both methods die if the argument is not a valid branch or version name.

  • patches($version)

    Returns an arrayref to the numerically sorted list of all available patches to build this target perl version.

        $apc->patches("5.7.1"); # returns an arrayref to an array with
                                # 1820 numbers

AUTHOR

andreas.koenig@anima.de

SEE ALSO

patchaperlup, buildaperl, binsearchaperl