Test::Smoke::Util::Execute - Run a command and return its output.
use Test::Smoke::Util::Execute; my $ex = Test::Smoke::Execute->new( verbose => $level, command => $command, arguments => [@arguments], ); my $output = eval { $ex->run() }; if (my $error = $@) { croak("Error running $command: $error"); }
Instantiate an object of this class
verbose => [0, 1, 2]
command => $command_to_pass_to_qx
The instantiated object.
Run the command with backticks.
None
Context aware list or scalar.
If any error occured, $self->exitcode is set.
$self->exitcode
Getter that returns the exitcode.
Accessor that returns the verbose.
Accessor that returns the arguments.
(c) MMXIII - Abe Timmerman <abeltje@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See:
http://www.perl.com/perl/misc/Artistic.html
http://www.gnu.org/copyleft/gpl.html
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install Test::Smoke, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Smoke
CPAN shell
perl -MCPAN -e shell install Test::Smoke
For more information on module installation, please visit the detailed CPAN module installation guide.