SmokeRunner::Multi::SafeRun - Run an external command safely in taint mode
version 0.21
use SmokeRunner::Multi::SafeRun qw( safe_run ); my $stdour; my $stderr; safe_run( command => 'agitate', args => [ '-file', $filename ], stdout_buffer => \$stdout, stderr_buffer => \$stderr, );
This module provides a taint-safe wrapper around the run3() function from IPC::Run3.
run3()
IPC::Run3
This module exports one optional subroutine:
This runs the specified command and captures its stdout and stderr streams in scalar references.
The command will be run in a taint-safe manner.
It expects the following parameters:
command
The name to the command to run. The module internally uses File::Which to find a matching executable in the path. If none can be found, the function will die.
File::Which
args
This should be an array reference containing arguments to be passed to the command. This parameter is optional.
stdout_buffer
stderr_buffer
These parameter should be references to scalars, which will be used to capture the output stream. You can pass the same scalar reference for both parameters.
If you are not interested in a particular stream, pass a reference to undef - \undef for that parameter.
\undef
Dave Rolsky, <autarch@urth.org>
Please report any bugs or feature requests to bug-smokerunner-multi@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-smokerunner-multi@rt.cpan.org
Copyright 2007 LiveText, Inc., All Rights Reserved.
This program is free software; you can redistribute it and /or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
Dave Rolsky <autarch@urth.org>
Yanick Champoux <yanick@cpan.org>
This software is copyright (c) 2007 by LiveText, Inc..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install SmokeRunner::Multi, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SmokeRunner::Multi
CPAN shell
perl -MCPAN -e shell install SmokeRunner::Multi
For more information on module installation, please visit the detailed CPAN module installation guide.