Test::AutoBuild::Monitor - Builder progress monitor
use Test::AutoBuild::Monitor my $rep = Test::AutoBuild::Monitor->new( name => "foo", label => "Some thing", enabled => 1, options => \%options, env => \%env); # Add a module to the repository $rep->module($module_name, $module); # Initialize the repository $rep->init(); # Checkout / update the module my $changed = $rep->export($name, $module);
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
The valid configuration options for the repositories block are
repositories
This method creates a new monitor. The name parameter specifies a short alpha-numeric name for the monitor. The label parameter specifies an arbitrary label for presenting to usres. The optional options argument is a hashref of implementation specific options. The optional env argument is a hashref of environment variables to set when handling notifications.
name
label
options
env
This method initializes the monitor object & is called automatically from the new method with the named parameters passed to that method.
new
Retrieves the name of this monitor, a short alpha-numeric token. If the optional $newname parameter is specified then the name is updated.
$newname
Returns a true value if this monitor is marked as enabled. If the optional $status parameter is specified then the enabled state is updated. If this method returns a false value, then the notify method will not call process, effectively becoming a no-op
$status
notify
process
Send a notification to this monitor. The $event_name parameter is a short alpha-numeric token representing the event triggering this notification. The @args params are arbitrary data items specific to this event. If the is_enabled method returns a true value, this method will invoke the proces method to actually handle the event, otherwise it will be a no-op
$event_name
@args
is_enabled
proces
This method must be implemented by sub-classes to provide the notification processing they require. The default implementation will simply call die. The arguments are the same as those for the notify method.
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.
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.
Daniel Berrange <dan@berrange.com>
Copyright (C) 2005 Daniel Berrange <dan@berrange.com>
perl(1), Test::AutoBuild::Monitor::CommandLine, Test::AutoBuild::Monitor::Log4perl, Test::AutoBuild::Monitor::Pipe
perl(1)
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.