diff options
author | Slaven Rezic <slaven@rezic.de> | 2009-05-29 18:05:43 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-05-30 15:11:14 +0200 |
commit | 92be70015ff9700800aa2ca8c8df8c3d2816c8c1 (patch) | |
tree | 512da53db42cd6b918fc461b5cd20e74bef113ef | |
parent | 68346ec51a76b5e85e1a39a113a22fe63e7992d2 (diff) | |
download | perl-92be70015ff9700800aa2ca8c8df8c3d2816c8c1.tar.gz |
clarified documentation about using lexical $err in open3 call
-rw-r--r-- | lib/IPC/Open3.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/IPC/Open3.pm b/lib/IPC/Open3.pm index 220b945463..61b5760a7b 100644 --- a/lib/IPC/Open3.pm +++ b/lib/IPC/Open3.pm @@ -23,6 +23,7 @@ IPC::Open3, open3 - open a process for reading, writing, and error handling 'some cmd and args', 'optarg', ...); my($wtr, $rdr, $err); + use Symbol 'gensym'; $err = gensym; $pid = open3($wtr, $rdr, $err, 'some cmd and args', 'optarg', ...); @@ -35,8 +36,9 @@ Extremely similar to open2(), open3() spawns the given $cmd and connects CHLD_OUT for reading from the child, CHLD_IN for writing to the child, and CHLD_ERR for errors. If CHLD_ERR is false, or the same file descriptor as CHLD_OUT, then STDOUT and STDERR of the child -are on the same filehandle. The CHLD_IN will have autoflush turned -on. +are on the same filehandle (this means that an autovivified lexical +cannot be used for the STDERR filehandle, see SYNOPSIS). The CHLD_IN +will have autoflush turned on. If CHLD_IN begins with C<< <& >>, then CHLD_IN will be closed in the parent, and the child will read from it directly. If CHLD_OUT or |