| Test-AutoBuild documentation | view source | Contained in the Test-AutoBuild distribution. |
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
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.
This method initializes the monitor object & is called automatically
from the new method with the named parameters passed to that method.
Retrieves the name of this monitor, a short alpha-numeric token.
If the optional $newname parameter is specified then the name
is updated.
Retrieves the name of this monitor, a short alpha-numeric token.
If the optional $newname parameter is specified then the name
is updated.
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
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
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>
| Test-AutoBuild documentation | view source | Contained in the Test-AutoBuild distribution. |