Name : perl-Proc-Short
| |
Version : 0.01
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp154.7.1
| Date : 2023-01-27 18:19:15
|
Group : Development/Libraries/Perl
| Source RPM : perl-Proc-Short-0.01-lp154.7.1.src.rpm
|
Size : 0.02 MB
| |
Packager : https://www_suse_com/
| |
Summary : Return Short System Calls with Options
|
Description :
The Proc::Short is intended to be an extension of the backticks operator in PERL which incorporates a number of options, including collecting STDOUT and STDERR separately -- plus timeout and automatic retries. A new process object is created by
$myproc = Proc::Short->new();
The default will timeout after 30 seconds (_timeout_) for each attempt, will try a process up to 10 times, with 5 seconds between each try. Either shell-like command lines or references to perl subroutines can be specified for launching a process in background. A simple list process, for example, can be started via the shell as
($out, $in) = $myproc->run(\"ls\");
or, as a perl subroutine, with
$myproc->run(sub { return < *> });
The _run_ Method will try to run the named process. If the process times out (after _time_per_try_ seconds) or has a error defined as unacceptable, it will wait (for _time_btw_tries_ seconds) and try again. This can repeat until _maxtime_ seconds or _num_tries_ tries of the process to be run.
The user can specify what constitutes an unacceptable error of STDOUT or STDERR output -- i.e. demanding a retry. One common shorthand is to have the _run_ method retry if there is any return from STDERR.
$myproc->accept_no_error(); # Re-try if any STDERR $myproc->pattern_stdout($pat); # require STDOUT to match regex $pat $myproc->pattern_stderr($pat); # require STDERR to match regex $pat
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-P/15.4/noarch |