| App::Framework::Feature::Run - Execute external commands |
App::Framework::Feature::Run - Execute external commands
use App::Framework::Feature::Run ;
An application feature (see the App::Framework::Feature manpage) that provides for external command running from within an application.
The program to run
String containing program arguments (may be specified as part of the 'cmd' string instead)
When specified causes the program to be run as a forked child
results check subroutine which should be of the form:
check_results($results_aref)
Where: $results_aref = ARRAY ref to all lines of text
Subroutine should return 0 = results ok; non-zero for program failed.
progress subroutine which should be in the form:
progress($line, $linenum, $state_href)
Where:
$line = line of text
$linenum = line number (starting at 1)
$state_href = An empty HASH ref (allows progress routine to store variables between calls)
=item B<status> - Program exit status
Reads as the program exit status
ARRAY ref of program output text lines
Evaluates all parameters and prints out the command that would have been executed
App::Framework::Feature::Run->new([%args])
Create a new Run.
The %args are specified as they would be in the set method (see Fields).
App::Framework::Feature::Run->init_class([%args])
Initialises the Run object class variables.
App::Framework::Feature->access([%args])
Provides access to the feature. Operates in two modes:
* if no arguments are provided, returns the feature object * if arguments are provided, calls the 'run()' method, then returns the object
App::Framework::Feature::Run->run([%args])
Execute a command, return exit status (0=success)
App::Framework::Feature::Run->run_results([%args])
Execute a command, return output lines
App::Framework::Feature::Run->run_cmd($cmd, [%args])
Execute a specified command, return exit status (0=success)
App::Framework::Feature::Run->run_cmd_results($cmd, [%args])
Execute a specified command, return output lines
App::Framework::Feature::Run->clear_args()
Clear out command args (ready for calls of the add_args method)
App::Framework::Feature::Run->add_args($args)
Add arguments from parameter $args.
If $args is scalar, append to existing arguments with a preceding space If $args is an array, append each to args If $args is a hash, append the args as an 'option' / 'value' pair. If 'value' is not defined, then just set the option.
App::Framework::Feature::Run->check_args()
Ensure arguments are correct
App::Framework::Feature::Run->print_run([%args])
Display the full command line as if it was going to be run
Setting the debug flag to level 1 prints out (to STDOUT) some debug messages, setting it to level 2 prints out more verbose messages.
Steve Price <sdprice at cpan.org>
None that I know of!
| App::Framework::Feature::Run - Execute external commands |