1Test::AutoBuild::CommanUds(e3r)Contributed Perl DocumentTaetsito:n:AutoBuild::Command(3)
2
3
4

NAME

6       Test::AutoBuild::Command - The base class for executing commands
7

SYNOPSIS

9         use Test::AutoBuild::Command;
10
11         my $cmd = Test::AutoBuild::Command->new(cmd => \@cmd, dir => $path, env => \%ENV);
12
13         # Execute the command
14         my $status = $counter->run($stdout, $stderr)
15

METHODS

17       my $stage = Test::AutoBuild::Command->new(cmd => \@cmd, dir => $path);
18           Creates a new command to be executed. The "cmd" argument provides
19           an array ref for the command line to be run. The optional "dir"
20           parameter provides a directory path which will be setup as the
21           current working directory prior to executing the command.
22
23       my $status = $cmd->run($stdout, $stderr);
24           Execute the command sending its STDOUT to <$stdout> and its STDERR
25           to $stderr. The $stdout and $stderr parameters can either contain
26           file paths into which output will be written; be instances of
27           "IO::Handle" to which output will be written, or simply be scalar
28           references to collect the data in memory. If they are undef, then
29           the output will be discarded. The returned $status is the command
30           exit status, typically zero for success, non-zero for failure.
31
32           This method must be implemented by subclasses.
33

AUTHORS

35       Daniel Berrange <dan@berrange.com>,
36
38       Copyright (C) 2007 Daniel Berrange
39

SEE ALSO

41       perl(1), Test::AutoBuild, Test::AutoBuild::Runtime,
42       Test::AutoBuild::Command::Local, Test::AutoBuild::Command::SELocal
43
44
45
46perl v5.12.1                      2007-06-30       Test::AutoBuild::Command(3)
Impressum