SmokeRunner::Multi::SafeRun - Run an external command safely in taint mode
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
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:
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.
This should be an array reference containing arguments to be passed to the command. This parameter is optional.
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.
Dave Rolsky, <firstname.lastname@example.org>
Please report any bugs or feature requests to
email@example.com, 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.
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.
This software is copyright (c) 2007 by LiveText, Inc..