Test::AutoBuild::Module - represents a code module to be built
use Test::AutoBuild::Module; my $module = Test::AutoBuild::Module->new(name => $name, label => $label, paths => \@paths, repository => $repository, [depends => \@modules,] [env => \%env,] [group => $group,] [dir => $directory], [buildroot => $directory], [controlfile => $controlfile]); $module->build($cache, \%modules); $module->install($cache, \%modules);
The Test::AutoBuild::Module manages a single code module in the build.
The valid configuration options for the modules block are
modules
my $module = Test::AutoBuild::Module->new(name => $name, label => $label, paths => \@paths, repository => $repository, [depends => \@modules,] [env => \%env,] [group => $group,] [dir => $directory], [buildroot => $directory], [controlfile => $controlfile]);
Creates a new code module object. name is a alphanumeric token for the name of the module. labe is a short human friendly title for the module. The paths array ref is a list of paths to checkout of the source repository, whose name is specified by repository. depends is an array ref containing a list of dependant module names. env is a hash ref of environment variables to define when building the module. group is the optional name of the group to which the module belongs. dir is the directory in which the module was checked out, if different from name. buildroot is the path of the virtual root directory for this module if different from the global default. The controlfile parameter is the name of the build control file to run if different from the global default.
name
labe
paths
repository
depends
env
group
dir
buildroot
controlfile
my $value = $module->option($name[, $newvalue]);
Returns the value of the option referenced by name. If the newvalue parameter is supplied, then the option is also updated.
newvalue
my $label = $module->label([$newlabel]);
Returns the label of this module, a short human friendly title. If the newlabel parameter is supplied the label is also updated.
newlabel
my $name = $module->name([$newname]);
Returns the name of this module, a short alphanumeric token. If the newname parameter is supplied the name is also updated.
newname
my \@paths = $module->paths([@newpaths]);
Returns an array reference of paths to check out of the source control repository. If the newpaths parameter is supplied, the paths are also updated.
newpaths
my $repository = $module->repository($newrep)
Returns the name of the source repository storing this module. If the newrep parameter is supplied the name is also updated.
newrep
my $path = $module->dir($newpath);
Returns the path for the directory checked out of source control. Typically this is the same as the module name. If the newpath parameter is supplied the dir is updated.
newpath
my $dir = $module->build_root([$newpath]);
Returns the path to the virtual root directory in which this module will install files. If the newpath parameter is supplied the build root will be updated.
$module->install($cache, \%modules);
Installs all this module's files from a previously populated build cache. If any dependant modules have not yet been processed, they will be installed first.
my \%packages = $module->packages($pkgs, $package_types);
Not quite sure what this does yet.
my \@modules = $module->dependancies([\@modules]);
Returns an array ref of dependant module names. If the modules parameter is supplied then the list of dependants is updated.
my \@links = $module->links([\@links]);
Returns an array ref of links associated with this module. Each element in the array is a hash reference. The keys in the hash reference are, title, description and href.
title
description
href
my \@artifacts = $module->artifacts([\@artifacts]);
Returns an array ref of artifacts to publish at the end of each build cycle. Each element in the array is a hash reference. The keys in the hash reference are, title, destionation, src, dst, and publisher.
destionation
src
dst
publisher
Daniel Berrange <dan@berrange.com>
Copyright (C) 2002-2004 Daniel Berrange <dan@berrange.com>
perl(1)
2 POD Errors
The following errors were encountered while parsing the POD:
You can't have =items (as at line 71) unless the first thing after the =over is an =item
=back doesn't take any parameters, but you said =back 4
To install Test::AutoBuild, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::AutoBuild
CPAN shell
perl -MCPAN -e shell install Test::AutoBuild
For more information on module installation, please visit the detailed CPAN module installation guide.