1Test::AutoBuild::MonitoUrs(e3r)Contributed Perl DocumentTaetsito:n:AutoBuild::Monitor(3)
2
3
4

NAME

6       Test::AutoBuild::Monitor - Builder progress monitor
7

SYNOPSIS

9         use Test::AutoBuild::Monitor
10
11         my $rep = Test::AutoBuild::Monitor->new(
12                      name => "foo",
13                      label => "Some thing",
14                      enabled => 1,
15                      options => \%options,
16                      env => \%env);
17
18         # Add a module to the repository
19         $rep->module($module_name, $module);
20
21         # Initialize the repository
22         $rep->init();
23
24         # Checkout / update the module
25         my $changed = $rep->export($name, $module);
26

DESCRIPTION

28       This module provides the API for interacting with the source control
29       repositories. A repository implementation has to be able to do two main
30       things
31
32        * Get a checkout of a new module
33        * Update an existing checkout, determining if any
34          changes where made
35

CONFIGURATION

37       The valid configuration options for the "repositories" block are
38

METHODS

40       my $monitor = Test::AutoBuild::Monitor->new(name => $name, label =>
41       $label, [enabled => $enabled,] [options => \%options,] [env => \%env]);
42           This method creates a new monitor. The "name" parameter specifies a
43           short alpha-numeric name for the monitor. The "label" parameter
44           specifies an arbitrary label for presenting to usres. The optional
45           "options" argument is a hashref of implementation specific options.
46           The optional "env" argument is a hashref of environment variables
47           to set when handling notifications.
48
49       $monitor->init(%params);
50           This method initializes the monitor object & is called automati‐
51           cally from the "new" method with the named parameters passed to
52           that method.
53
54       my $name = $monitor->name([$newname]);
55           Retrieves the name of this monitor, a short alpha-numeric token.
56           If the optional $newname parameter is specified then the name is
57           updated.
58
59       my $name = $monitor->label([$newname]);
60           Retrieves the name of this monitor, a short alpha-numeric token.
61           If the optional $newname parameter is specified then the name is
62           updated.
63
64       my $name = $monitor->is_enabled([$state]);
65           Returns a true value if this monitor is marked as enabled.  If the
66           optional $status parameter is specified then the enabled state is
67           updated. If this method returns a false value, then the "notify"
68           method will not call "process", effectively becoming a no-op
69
70       my $monitor->notify($event_name, @args);
71           Send a notification to this monitor. The $event_name parameter is a
72           short alpha-numeric token representing the event triggering this
73           notification. The @args params are arbitrary data items specific to
74           this event. If the "is_enabled" method returns a true value, this
75           method will invoke the "proces" method to actually handle the
76           event, otherwise it will be a no-op
77
78       my $monitor->process($event_name, @args);
79           This method must be implemented by sub-classes to provide the noti‐
80           fication processing they require. The default implementation will
81           simply call die. The arguments are the same as those for the
82           "notify" method.
83
84       my $value = $rep->option($name[, $value]);
85           When run with a single argument, retuns the option value corre‐
86           sponding to the name specified in the first argument. If a second
87           argument is supplied, then the option value is updated.
88
89       my $value = $rep->env($name[, $value]);
90           When run with a single argument, retuns the environment variable
91           corresponding to the name specified in the first argument. If a
92           second argument is supplied, then the environment variable is
93           updated.
94

AUTHORS

96       Daniel Berrange <dan@berrange.com>
97
99       Copyright (C) 2005 Daniel Berrange <dan@berrange.com>
100

SEE ALSO

102       perl(1), Test::AutoBuild::Monitor::CommandLine, Test::AutoBuild::Moni‐
103       tor::Log4perl, Test::AutoBuild::Monitor::Pipe
104
105
106
107perl v5.8.8                       2007-12-09       Test::AutoBuild::Monitor(3)
Impressum