ETLp::Utility::Command - Runs Operating System Commands
use FindBin qw($Bin); use ETLp::Utility::Command; my $os = ETLp::Utility::Command->new(); my ($output, $retcode) = $os->run('ls -l'); if ($retcode) { printf("Error %s\n", $os->errstr); printf("Outout %s\n", $output); }
Create a new ETLp::Utility::Command object.
Parameters
* time_out. optional. How long the command should run before aborting
Executes the supplied comand
* An Operating System command (as a string);
* In a scalar context o The command's return code * In an array context o The output of the command o The command's return code
Returns any error from the last run command
Paramaters
* None
Returns
* An error message (if there is one)
Copyright 2010 Redbone Systems Ltd
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
The terms are in the LICENSE file that accompanies this application
1;
To install ETLp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ETLp
CPAN shell
perl -MCPAN -e shell install ETLp
For more information on module installation, please visit the detailed CPAN module installation guide.