in reply to Modules which improve system() ?
Have I been missing this obviously simple module all this time, and if so, what is it called? (If not, then watch this space for a new module announcement.)Oops, sorry. I skipped over the "watch this space" part when I read this thread, and went off to write the module (since I've wanted this many times too.) It's now uploaded to CPAN as IPC::Run::Simple. If you want to take it over, let me know.
The module currently allows either:
which is what I normally want, or:use IPC::Run::Simple; run("some", "command") or die "command failed"; # better done as use IPC::Run::Simple qw(:all); run("some", "command") or die "badness! $ERR";
for what you want. Or, even closer to what you said:use IPC::Run::Simple qw(:Fatal); my $exit_value = run(command => [ "some", "command" ], allowed => [ 0, 1, 5 ]);
use IPC::Run::Simple qw(:Fatal); my $exit_value = run(command => "some_command", allowed => [ 0, 1, 5 ]);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Modules which improve system() ?
by pjf (Curate) on Jun 26, 2006 at 04:29 UTC | |
by sfink (Deacon) on Jun 27, 2006 at 07:25 UTC | |
by pjf (Curate) on Jun 28, 2006 at 03:01 UTC | |
by bart (Canon) on Jul 04, 2006 at 03:45 UTC |