Proc::ReliableRun external processes reliably with many options | |
Download |
Proc::Reliable Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Dan Goldwater
- Publisher web site:
- http://www.zblob.com/software/
Proc::Reliable Tags
Proc::Reliable Description
Run external processes reliably with many options Proc::Reliable is a module for simple, reliable and configurable subprocess execution in Perl. In particular, it is especially useful for managing the execution of 'problem' programs which are likely to fail, hang, or otherwise behave in an unruly manner.Proc::Reliable includes all the functionality of the backticks operator and system() functions, plus many common uses of fork() and exec(), open2() and open3(). Proc::Reliable incorporates a number of options, including sending data to the subprocess on STDIN, collecting STDOUT and STDERR separately or together, killing hung processes, timouts and automatic retries.SYNOPSISuse Proc::Reliable;Create a new process object $myproc = Proc::Reliable->new();Run a subprocess and collect its output $output = $myproc->run("/bin/ls -l");Check for problems if($myproc->status()) { print("problem! "); }Run another subprocess, keeping stdout and stderr separated. Also, send the subprocess some data on stdin. $msg = "Hello World "); $p->want_single_list(0); $stdout = $p->run("/usr/bin/fastmail - foo@bar.com", $msg); if($p->status()) { print("problem: ", $p->stderr(), " "); }Another way to get output ($stdout, $stderr, $status, $msg) = $p->run("/bin/ls -l"); Requirements: · Perl
Proc::Reliable Related Software