734 lines
21 KiB
HTML
734 lines
21 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of IPC::System::Simple</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>IPC::System::Simple</H1>
|
|
Section: User Contributed Perl Documentation (3pm)<BR>Updated: 2020-01-29<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
IPC::System::Simple - Run commands simply, with detailed diagnostics
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
use IPC::System::Simple qw(system systemx capture capturex);
|
|
|
|
system("some_command"); # Command succeeds or dies!
|
|
|
|
system("some_command",@args); # Succeeds or dies, avoids shell if @args
|
|
|
|
systemx("some_command",@args); # Succeeds or dies, NEVER uses the shell
|
|
|
|
|
|
# Capture the output of a command (just like backticks). Dies on error.
|
|
my $output = capture("some_command");
|
|
|
|
# Just like backticks in list context. Dies on error.
|
|
my @output = capture("some_command");
|
|
|
|
# As above, but avoids the shell if @args is non-empty
|
|
my $output = capture("some_command", @args);
|
|
|
|
# As above, but NEVER invokes the shell.
|
|
my $output = capturex("some_command", @args);
|
|
my @output = capturex("some_command", @args);
|
|
|
|
</PRE>
|
|
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
Calling Perl's in-built <TT>"system()"</TT> function is easy,
|
|
determining if it was successful is <I>hard</I>. Let's face it,
|
|
<TT>$?</TT> isn't the nicest variable in the world to play with, and
|
|
even if you <I>do</I> check it, producing a well-formatted error
|
|
string takes a lot of work.
|
|
<P>
|
|
|
|
<TT>"IPC::System::Simple"</TT> takes the hard work out of calling
|
|
external commands. In fact, if you want to be really lazy,
|
|
you can just write:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
use IPC::System::Simple qw(system);
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
and all of your <TT>"system"</TT> commands will either succeed (run to
|
|
completion and return a zero exit value), or die with rich diagnostic
|
|
messages.
|
|
<P>
|
|
|
|
The <TT>"IPC::System::Simple"</TT> module also provides a simple replacement
|
|
to Perl's backticks operator. Simply write:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
use IPC::System::Simple qw(capture);
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
and then use the ``<B>capture()</B>'' command just like you'd use backticks.
|
|
If there's an error, it will die with a detailed description of what
|
|
went wrong. Better still, you can even use <TT>"capturex()"</TT> to run the
|
|
equivalent of backticks, but without the shell:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
use IPC::System::Simple qw(capturex);
|
|
|
|
my $result = capturex($command, @args);
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
If you want more power than the basic interface, including the
|
|
ability to specify which exit values are acceptable, trap errors,
|
|
or process diagnostics, then read on!
|
|
<A NAME="lbAE"> </A>
|
|
<H2>ADVANCED SYNOPSIS</H2>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
use IPC::System::Simple qw(
|
|
capture capturex system systemx run runx $EXITVAL EXIT_ANY
|
|
);
|
|
|
|
# Run a command, throwing exception on failure
|
|
|
|
run("some_command");
|
|
|
|
runx("some_command",@args); # Run a command, avoiding the shell
|
|
|
|
# Do the same thing, but with the drop-in system replacement.
|
|
|
|
system("some_command");
|
|
|
|
systemx("some_command", @args);
|
|
|
|
# Run a command which must return 0..5, avoid the shell, and get the
|
|
# exit value (we could also look at $EXITVAL)
|
|
|
|
my $exit_value = runx([0..5], "some_command", @args);
|
|
|
|
# The same, but any exit value will do.
|
|
|
|
my $exit_value = runx(EXIT_ANY, "some_command", @args);
|
|
|
|
# Capture output into $result and throw exception on failure
|
|
|
|
my $result = capture("some_command");
|
|
|
|
# Check exit value from captured command
|
|
|
|
print "some_command exited with status $EXITVAL\n";
|
|
|
|
# Captures into @lines, splitting on $/
|
|
my @lines = capture("some_command");
|
|
|
|
# Run a command which must return 0..5, capture the output into
|
|
# @lines, and avoid the shell.
|
|
|
|
my @lines = capturex([0..5], "some_command", @args);
|
|
|
|
</PRE>
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>ADVANCED USAGE</H2>
|
|
|
|
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H3><B>run()</B> and <B>system()</B></H3>
|
|
|
|
|
|
|
|
<TT>"IPC::System::Simple"</TT> provides a subroutine called
|
|
<TT>"run"</TT>, that executes a command using the same semantics as
|
|
Perl's built-in <TT>"system"</TT>:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
use IPC::System::Simple qw(run);
|
|
|
|
run("cat *.txt"); # Execute command via the shell
|
|
run("cat","/etc/motd"); # Execute command without shell
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
The primary difference between Perl's in-built system and
|
|
the <TT>"run"</TT> command is that <TT>"run"</TT> will throw an exception on
|
|
failure, and allows a list of acceptable exit values to be set.
|
|
See ``Exit values'' for further information.
|
|
<P>
|
|
|
|
In fact, you can even have <TT>"IPC::System::Simple"</TT> replace the
|
|
default <TT>"system"</TT> function for your package so it has the
|
|
same behaviour:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
use IPC::System::Simple qw(system);
|
|
|
|
system("cat *.txt"); # system now succeeds or dies!
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
<TT>"system"</TT> and <TT>"run"</TT> are aliases to each other.
|
|
<P>
|
|
|
|
See also ``<B>runx()</B>, <B>systemx()</B> and <B>capturex()</B>'' for variants of
|
|
<TT>"system()"</TT> and <TT>"run()"</TT> that never invoke the shell, even with
|
|
a single argument.
|
|
<A NAME="lbAH"> </A>
|
|
<H3><B>capture()</B></H3>
|
|
|
|
|
|
|
|
A second subroutine, named <TT>"capture"</TT> executes a command with
|
|
the same semantics as Perl's built-in backticks (and <TT>"qx()"</TT>):
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
use IPC::System::Simple qw(capture);
|
|
|
|
# Capture text while invoking the shell.
|
|
my $file = capture("cat /etc/motd");
|
|
my @lines = capture("cat /etc/passwd");
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
However unlike regular backticks, which always use the shell, <TT>"capture"</TT>
|
|
will bypass the shell when called with multiple arguments:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
# Capture text while avoiding the shell.
|
|
my $file = capture("cat", "/etc/motd");
|
|
my @lines = capture("cat", "/etc/passwd");
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
See also ``<B>runx()</B>, <B>systemx()</B> and <B>capturex()</B>'' for a variant of
|
|
<TT>"capture()"</TT> that never invokes the shell, even with a single
|
|
argument.
|
|
<A NAME="lbAI"> </A>
|
|
<H3><B>runx()</B>, <B>systemx()</B> and <B>capturex()</B></H3>
|
|
|
|
|
|
|
|
The <TT>"runx()"</TT>, <TT>"systemx()"</TT> and <TT>"capturex()"</TT> commands are identical
|
|
to the multi-argument forms of <TT>"run()"</TT>, <TT>"system()"</TT> and <TT>"capture()"</TT>
|
|
respectively, but <I>never</I> invoke the shell, even when called with a
|
|
single argument. These forms are particularly useful when a command's
|
|
argument list <I>might</I> be empty, for example:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
systemx($cmd, @args);
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
The use of <TT>"systemx()"</TT> here guarantees that the shell will <I>never</I>
|
|
be invoked, even if <TT>@args</TT> is empty.
|
|
<A NAME="lbAJ"> </A>
|
|
<H3>Exception handling</H3>
|
|
|
|
|
|
|
|
In the case where the command returns an unexpected status, both <TT>"run"</TT> and
|
|
<TT>"capture"</TT> will throw an exception, which if not caught will terminate your
|
|
program with an error.
|
|
<P>
|
|
|
|
Capturing the exception is easy:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
eval {
|
|
run("cat *.txt");
|
|
};
|
|
|
|
if ($@) {
|
|
print "Something went wrong - $@\n";
|
|
}
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
See the diagnostics section below for more details.
|
|
<P>
|
|
|
|
<I>Exception cases</I>
|
|
|
|
|
|
<P>
|
|
|
|
<TT>"IPC::System::Simple"</TT> considers the following to be unexpected,
|
|
and worthy of exception:
|
|
<DL COMPACT>
|
|
<DT id="1">•<DD>
|
|
Failing to start entirely (eg, command not found, permission denied).
|
|
<DT id="2">•<DD>
|
|
Returning an exit value other than zero (but see below).
|
|
<DT id="3">•<DD>
|
|
Being killed by a signal.
|
|
<DT id="4">•<DD>
|
|
Being passed tainted data (in taint mode).
|
|
</DL>
|
|
<A NAME="lbAK"> </A>
|
|
<H3>Exit values</H3>
|
|
|
|
|
|
|
|
Traditionally, system commands return a zero status for success and a
|
|
non-zero status for failure. <TT>"IPC::System::Simple"</TT> will default to throwing
|
|
an exception if a non-zero exit value is returned.
|
|
<P>
|
|
|
|
You may specify a range of values which are considered acceptable exit
|
|
values by passing an <I>array reference</I> as the first argument. The
|
|
special constant <TT>"EXIT_ANY"</TT> can be used to allow <I>any</I> exit value
|
|
to be returned.
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
use IPC::System::Simple qw(run system capture EXIT_ANY);
|
|
|
|
run( [0..5], "cat *.txt"); # Exit values 0-5 are OK
|
|
|
|
system( [0..5], "cat *.txt"); # This works the same way
|
|
|
|
my @lines = capture( EXIT_ANY, "cat *.txt"); # Any exit is fine.
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
The <TT>"run"</TT> and replacement <TT>"system"</TT> subroutines returns the exit
|
|
value of the process:
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
my $exit_value = run( [0..5], "cat *.txt");
|
|
|
|
# OR:
|
|
|
|
my $exit_value = system( [0..5] "cat *.txt");
|
|
|
|
print "Program exited with value $exit_value\n";
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
<I></I>$EXITVAL<I></I>
|
|
|
|
|
|
<P>
|
|
|
|
The exit value of any command executed by <TT>"IPC::System::Simple"</TT>
|
|
can always be retrieved from the <TT>$IPC::System::Simple::EXITVAL</TT>
|
|
variable:
|
|
<P>
|
|
|
|
This is particularly useful when inspecting results from <TT>"capture"</TT>,
|
|
which returns the captured text from the command.
|
|
<P>
|
|
|
|
|
|
|
|
<PRE>
|
|
use IPC::System::Simple qw(capture $EXITVAL EXIT_ANY);
|
|
|
|
my @enemies_defeated = capture(EXIT_ANY, "defeat_evil", "/dev/mordor");
|
|
|
|
print "Program exited with value $EXITVAL\n";
|
|
|
|
</PRE>
|
|
|
|
|
|
<P>
|
|
|
|
<TT>$EXITVAL</TT> will be set to <TT>"-1"</TT> if the command did not exit normally (eg,
|
|
being terminated by a signal) or did not start. In this situation an
|
|
exception will also be thrown.
|
|
<A NAME="lbAL"> </A>
|
|
<H3>WINDOWS-SPECIFIC <FONT SIZE="-1">NOTES</FONT></H3>
|
|
|
|
|
|
|
|
As of <TT>"IPC::System::Simple"</TT> v0.06, the <TT>"run"</TT> subroutine <I>when
|
|
called with multiple arguments</I> will make available the full 32-bit
|
|
exit value on Win32 systems. This is different from the
|
|
previous versions of <TT>"IPC::System::Simple"</TT> and from Perl's
|
|
in-build <TT>"system()"</TT> function, which can only handle 8-bit return values.
|
|
<P>
|
|
|
|
The <TT>"capture"</TT> subroutine always returns the 32-bit exit value under
|
|
Windows. The <TT>"capture"</TT> subroutine also never uses the shell,
|
|
even when passed a single argument.
|
|
<P>
|
|
|
|
Versions of <TT>"IPC::System::Simple"</TT> before v0.09 would not search
|
|
the <TT>"PATH"</TT> environment variable when the multi-argument form of
|
|
<TT>"run()"</TT> was called. Versions from v0.09 onwards correctly search
|
|
the path provided the command is provided including the extension
|
|
(eg, <TT>"notepad.exe"</TT> rather than just <TT>"notepad"</TT>, or <TT>"gvim.bat"</TT> rather
|
|
than just <TT>"gvim"</TT>). If no extension is provided, <TT>".exe"</TT> is
|
|
assumed.
|
|
<P>
|
|
|
|
Signals are not supported on Windows systems. Sending a signal
|
|
to a Windows process will usually cause it to exit with the signal
|
|
number used.
|
|
<A NAME="lbAM"> </A>
|
|
<H2>DIAGNOSTICS</H2>
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="5">"%s" failed to start: "%s"<DD>
|
|
|
|
|
|
|
|
|
|
The command specified did not even start. It may not exist, or
|
|
you may not have permission to use it. The reason it could not
|
|
start (as determined from <TT>$!</TT>) will be provided.
|
|
<DT id="6">"%s" unexpectedly returned exit value %d<DD>
|
|
|
|
|
|
|
|
|
|
The command ran successfully, but returned an exit value we did
|
|
not expect. The value returned is reported.
|
|
<DT id="7">"%s" died to signal "%s" (%d) %s<DD>
|
|
|
|
|
|
|
|
|
|
The command was killed by a signal. The name of the signal
|
|
will be reported, or <TT>"UNKNOWN"</TT> if it cannot be determined. The
|
|
signal number is always reported. If we detected that the
|
|
process dumped core, then the string <TT>"and dumped core"</TT> is
|
|
appended.
|
|
<DT id="8">IPC::System::Simple::%s called with no arguments<DD>
|
|
|
|
|
|
You attempted to call <TT>"run"</TT> or <TT>"capture"</TT> but did not provide any
|
|
arguments at all. At the very lease you need to supply a command
|
|
to run.
|
|
<DT id="9">IPC::System::Simple::%s called with no command<DD>
|
|
|
|
|
|
You called <TT>"run"</TT> or <TT>"capture"</TT> with a list of acceptable exit values,
|
|
but no actual command.
|
|
<DT id="10">IPC::System::Simple::%s called with tainted argument "%s"<DD>
|
|
|
|
|
|
|
|
|
|
You called <TT>"run"</TT> or <TT>"capture"</TT> with tainted (untrusted) arguments, which is
|
|
almost certainly a bad idea. To untaint your arguments you'll need to pass
|
|
your data through a regular expression and use the resulting match variables.
|
|
See ``Laundering and Detecting Tainted Data'' in perlsec for more information.
|
|
<DT id="11">IPC::System::Simple::%s called with tainted environment $ENV{%s}<DD>
|
|
|
|
|
|
|
|
|
|
You called <TT>"run"</TT> or <TT>"capture"</TT> but part of your environment was tainted
|
|
(untrusted). You should either delete the named environment
|
|
variable before calling <TT>"run"</TT>, or set it to an untainted value
|
|
(usually one set inside your program). See
|
|
``Cleaning Up Your Path'' in perlsec for more information.
|
|
<DT id="12">Error in IPC::System::Simple plumbing: "%s" - "%s"<DD>
|
|
|
|
|
|
|
|
|
|
Implementing the <TT>"capture"</TT> command involves dark and terrible magicks
|
|
involving pipes, and one of them has sprung a leak. This could be due to a
|
|
lack of file descriptors, although there are other possibilities.
|
|
|
|
|
|
<P>
|
|
|
|
|
|
If you are able to reproduce this error, you are encouraged
|
|
to submit a bug report according to the ``Reporting bugs'' section below.
|
|
<DT id="13">Internal error in IPC::System::Simple: "%s"<DD>
|
|
|
|
|
|
|
|
|
|
You've found a bug in <TT>"IPC::System::Simple"</TT>. Please check to
|
|
see if an updated version of <TT>"IPC::System::Simple"</TT> is available.
|
|
If not, please file a bug report according to the ``Reporting bugs'' section
|
|
below.
|
|
<DT id="14">IPC::System::Simple::%s called with undefined command<DD>
|
|
|
|
|
|
You've passed the undefined value as a command to be executed.
|
|
While this is a very Zen-like action, it's not supported by
|
|
Perl's current implementation.
|
|
</DL>
|
|
<A NAME="lbAN"> </A>
|
|
<H2>DEPENDENCIES</H2>
|
|
|
|
|
|
|
|
This module depends upon Win32::Process when used on Win32
|
|
system. <TT>"Win32::Process"</TT> is bundled as a core module in ActivePerl 5.6
|
|
and above.
|
|
<P>
|
|
|
|
There are no non-core dependencies on non-Win32 systems.
|
|
<A NAME="lbAO"> </A>
|
|
<H2>COMPARISON TO OTHER APIs</H2>
|
|
|
|
|
|
|
|
Perl provides a range of in-built functions for handling external
|
|
commands, and <FONT SIZE="-1">CPAN</FONT> provides even more. The <TT>"IPC::System::Simple"</TT>
|
|
differentiates itself from other options by providing:
|
|
<DL COMPACT>
|
|
<DT id="15">Extremely detailed diagnostics<DD>
|
|
|
|
|
|
The diagnostics produced by <TT>"IPC::System::Simple"</TT> are designed
|
|
to provide as much information as possible. Rather than requiring
|
|
the developer to inspect <TT>$?</TT>, <TT>"IPC::System::Simple"</TT> does the
|
|
hard work for you.
|
|
|
|
|
|
<P>
|
|
|
|
|
|
If an odd exit status is provided, you're informed of what it is. If a
|
|
signal kills your process, you are informed of both its name and number.
|
|
If tainted data or environment prevents your command from running, you
|
|
are informed of exactly which data or environmental variable is
|
|
tainted.
|
|
<DT id="16">Exceptions on failure<DD>
|
|
|
|
|
|
<TT>"IPC::System::Simple"</TT> takes an aggressive approach to error handling.
|
|
Rather than allow commands to fail silently, exceptions are thrown
|
|
when unexpected results are seen. This allows for easy development
|
|
using a try/catch style, and avoids the possibility of accidentally
|
|
continuing after a failed command.
|
|
<DT id="17">Easy access to exit status<DD>
|
|
|
|
|
|
The <TT>"run"</TT>, <TT>"system"</TT> and <TT>"capture"</TT> commands all set <TT>$EXITVAL</TT>,
|
|
making it easy to determine the exit status of a command.
|
|
Additionally, the <TT>"system"</TT> and <TT>"run"</TT> interfaces return the exit
|
|
status.
|
|
<DT id="18">Consistent interfaces<DD>
|
|
|
|
|
|
When called with multiple arguments, the <TT>"run"</TT>, <TT>"system"</TT> and
|
|
<TT>"capture"</TT> interfaces <I>never</I> invoke the shell. This differs
|
|
from the in-built Perl <TT>"system"</TT> command which may invoke the
|
|
shell under Windows when called with multiple arguments. It
|
|
differs from the in-built Perl backticks operator which always
|
|
invokes the shell.
|
|
</DL>
|
|
<A NAME="lbAP"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
|
|
|
|
When <TT>"system"</TT> is exported, the exotic form <TT>"system { $cmd } @args"</TT>
|
|
is not supported. Attemping to use the exotic form is a syntax
|
|
error. This affects the calling package <I>only</I>. Use <TT>"CORE::system"</TT>
|
|
if you need it, or consider using the autodie module to replace
|
|
<TT>"system"</TT> with lexical scope.
|
|
<P>
|
|
|
|
Core dumps are only checked for when a process dies due to a
|
|
signal. It is not believed there are any systems where processes
|
|
can dump core without dying to a signal.
|
|
<P>
|
|
|
|
<TT>"WIFSTOPPED"</TT> status is not checked, as perl never spawns processes
|
|
with the <TT>"WUNTRACED"</TT> option.
|
|
<P>
|
|
|
|
Signals are not supported under Win32 systems, since they don't
|
|
work at all like Unix signals. Win32 signals cause commands to
|
|
exit with a given exit value, which this modules <I>does</I> capture.
|
|
<P>
|
|
|
|
Only 8-bit values are returned when <TT>"run()"</TT> or <TT>"system()"</TT>
|
|
is called with a single value under Win32. Multi-argument calls
|
|
to <TT>"run()"</TT> and <TT>"system()"</TT>, as well as the <TT>"runx()"</TT> and
|
|
<TT>"systemx()"</TT> always return the 32-bit Windows return values.
|
|
<A NAME="lbAQ"> </A>
|
|
<H3>Reporting bugs</H3>
|
|
|
|
|
|
|
|
Before reporting a bug, please check to ensure you are using the
|
|
most recent version of <TT>"IPC::System::Simple"</TT>. Your problem may
|
|
have already been fixed in a new release.
|
|
<P>
|
|
|
|
You can find the <TT>"IPC::System::Simple"</TT> bug-tracker at
|
|
<<A HREF="http://rt.cpan.org/Public/Dist/Display.html?Name=IPC-System-Simple">http://rt.cpan.org/Public/Dist/Display.html?Name=IPC-System-Simple</A>> .
|
|
Please check to see if your bug has already been reported; if
|
|
in doubt, report yours anyway.
|
|
<P>
|
|
|
|
Submitting a patch and/or failing test case will greatly expedite
|
|
the fixing of bugs.
|
|
<A NAME="lbAR"> </A>
|
|
<H2>FEEDBACK</H2>
|
|
|
|
|
|
|
|
If you find this module useful, please consider rating it on the
|
|
<FONT SIZE="-1">CPAN</FONT> Ratings service at
|
|
<<A HREF="http://cpanratings.perl.org/rate/?distribution=IPC-System-Simple">http://cpanratings.perl.org/rate/?distribution=IPC-System-Simple</A>> .
|
|
<P>
|
|
|
|
The module author loves to hear how <TT>"IPC::System::Simple"</TT> has made
|
|
your life better (or worse). Feedback can be sent to
|
|
<<A HREF="mailto:pjf@perltraining.com.au">pjf@perltraining.com.au</A>>.
|
|
<A NAME="lbAS"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
autodie uses <TT>"IPC::System::Simple"</TT> to provide succeed-or-die
|
|
replacements to <TT>"system"</TT> (and other built-ins) with lexical scope.
|
|
<P>
|
|
|
|
<FONT SIZE="-1">POSIX</FONT>, IPC::Run::Simple, perlipc, perlport, IPC::Run,
|
|
IPC::Run3, Win32::Process
|
|
<A NAME="lbAT"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
|
|
|
|
Paul Fenwick <<A HREF="mailto:pjf@cpan.org">pjf@cpan.org</A>>
|
|
<A NAME="lbAU"> </A>
|
|
<H2>COPYRIGHT AND LICENSE</H2>
|
|
|
|
|
|
|
|
Copyright (C) 2006-2008 by Paul Fenwick
|
|
<P>
|
|
|
|
This library is free software; you can redistribute it and/or modify
|
|
it under the same terms as Perl itself, either Perl version 5.6.0 or,
|
|
at your option, any later version of Perl 5 you may have available.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="19"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="20"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="21"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="22"><A HREF="#lbAE">ADVANCED SYNOPSIS</A><DD>
|
|
<DT id="23"><A HREF="#lbAF">ADVANCED USAGE</A><DD>
|
|
<DL>
|
|
<DT id="24"><A HREF="#lbAG"><B>run()</B> and <B>system()</B></A><DD>
|
|
<DT id="25"><A HREF="#lbAH"><B>capture()</B></A><DD>
|
|
<DT id="26"><A HREF="#lbAI"><B>runx()</B>, <B>systemx()</B> and <B>capturex()</B></A><DD>
|
|
<DT id="27"><A HREF="#lbAJ">Exception handling</A><DD>
|
|
<DT id="28"><A HREF="#lbAK">Exit values</A><DD>
|
|
<DT id="29"><A HREF="#lbAL">WINDOWS-SPECIFIC <FONT SIZE="-1">NOTES</FONT></A><DD>
|
|
</DL>
|
|
<DT id="30"><A HREF="#lbAM">DIAGNOSTICS</A><DD>
|
|
<DT id="31"><A HREF="#lbAN">DEPENDENCIES</A><DD>
|
|
<DT id="32"><A HREF="#lbAO">COMPARISON TO OTHER APIs</A><DD>
|
|
<DT id="33"><A HREF="#lbAP">BUGS</A><DD>
|
|
<DL>
|
|
<DT id="34"><A HREF="#lbAQ">Reporting bugs</A><DD>
|
|
</DL>
|
|
<DT id="35"><A HREF="#lbAR">FEEDBACK</A><DD>
|
|
<DT id="36"><A HREF="#lbAS">SEE ALSO</A><DD>
|
|
<DT id="37"><A HREF="#lbAT">AUTHOR</A><DD>
|
|
<DT id="38"><A HREF="#lbAU">COPYRIGHT AND LICENSE</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:46 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|