The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::AutoBuild::Repository - Source control repository access

SYNOPSIS

  use Test::AutoBuild::Repository

  my $rep = Test::AutoBuild::Repository->new(
               name => $name,
               options => \%options,
               env => \%env,
               label => $label);

  # Add a module to the repository
  $rep->module($module);

  # Initialize the repository
  $rep->init();
 
  # Checkout / update the module
  my $changed = $rep->export($name, $module);

DESCRIPTION

This module provides the API for interacting with the source control repositories. A repository implementation has to be able to do two main things

 * Get a checkout of a new module
 * Update an existing checkout, determining if any
   changes where made

CONFIGURATION

The valid configuration options for the repositories block are

METHODS

    my $rep = Test::AutoBuild::Repository->new(name => $name, label => $label, options => \%options, env => \%env);

    This method creates a new repository. The name argument is an alphanumeric token representing the name of the repository. The label argument is a human friendly name of the repository. The optional options argument is a hashref of implementation specific options. The optional env argument is a hashref of environment variables to set when running the commands to access the repository.

    my $name = $rep->name([$name]);

    When run without any arguments, returns the alphanumeric token representing the name of the repository. If a single argument is supplied, this is use to update the name.

    my $value = $rep->option($name[, $value]);

    When run with a single argument, retuns the option value corresponding to the name specified in the first argument. If a second argument is supplied, then the option value is updated.

    my $value = $rep->env($name[, $value]);

    When run with a single argument, retuns the environment variable corresponding to the name specified in the first argument. If a second argument is supplied, then the environment variable is updated.

    my $label = $rep->label([$label]);

    When run without any arguments, returns the human friendly string representing the label of the repository. If a single argument is supplied, this is use to update the label.

    my $module = $rep->module($name[, $module]);

    When run with a single argument, returns the module object corresponding to the name specified as the first argument. If the second argument is supplied, then the module object is updated.

    my @modules = $rep->modules();

    Returns the list of modules in this repository

    $rep->init();

    Performs any one time initialization required prior to exporting modules from the repoitory.

    my $changed = $rep->export($name, $module);

    Exports the module specified in the second argument to a directory specified by the first argument. Returns zero if there were no changes to export; non-zero if the module was new or changed. This is a virtual method which must be implemented by all subclasses.

    my $output = $rep->_run($cmd);

    Runs the command specified in the first argument, having first setup the environment variables specified when the repository was created. It returns any text written to standard out by the command

AUTHORS

Daniel Berrange <dan@berrange.com>

COPYRIGHT

Copyright (C) 2002 Daniel Berrange <dan@berrange.com>

SEE ALSO

perl(1)

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 64:

You can't have =items (as at line 77) unless the first thing after the =over is an =item

Around line 251:

=back doesn't take any parameters, but you said =back 4