summaryrefslogtreecommitdiff
path: root/lib/IPC/Open2.pm
diff options
context:
space:
mode:
authorAndy Dougherty <doughera.lafayette.edu>1995-12-21 00:01:16 +0000
committerAndy Dougherty <doughera.lafayette.edu>1995-12-21 00:01:16 +0000
commitcb1a09d0194fed9b905df7b04a4bc031d354609d (patch)
treef0c890a5a8f5274873421ac573dfc719188e5eec /lib/IPC/Open2.pm
parent3712091946b37b5feabcc1f630b32639406ad717 (diff)
downloadperl-cb1a09d0194fed9b905df7b04a4bc031d354609d.tar.gz
This is patch.2b1g to perl5.002beta1.
cd to your perl source directory, and type patch -p1 -N < patch.2b1g This patch is just my packaging of Tom's documentation patches he released as patch.2b1g. Patch and enjoy, Andy Dougherty doughera@lafcol.lafayette.edu Dept. of Physics Lafayette College, Easton PA 18042
Diffstat (limited to 'lib/IPC/Open2.pm')
-rw-r--r--lib/IPC/Open2.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/IPC/Open2.pm b/lib/IPC/Open2.pm
index 71f89f35c2..1ac963ab6b 100644
--- a/lib/IPC/Open2.pm
+++ b/lib/IPC/Open2.pm
@@ -10,9 +10,9 @@ IPC::Open2, open2 - open a process for both reading and writing
=head1 SYNOPSIS
use IPC::Open2;
- $pid = open2('rdr', 'wtr', 'some cmd and args');
+ $pid = open2(\*RDR, \*WTR, 'some cmd and args');
# or
- $pid = open2('rdr', 'wtr', 'some', 'cmd', 'and', 'args');
+ $pid = open2(\*RDR, \*WTR, 'some', 'cmd', 'and', 'args');
=head1 DESCRIPTION
@@ -39,7 +39,7 @@ however, are quite apt to cause deadlock.
The big problem with this approach is that if you don't have control
over source code being run in the the child process, you can't control what it does
-with pipe buffering. Thus you can't just open a pipe to "cat -v" and continually
+with pipe buffering. Thus you can't just open a pipe to C<cat -v> and continually
read and write a line from it.
=head1 SEE ALSO
@@ -80,8 +80,8 @@ sub open2 {
# force unqualified filehandles into callers' package
local($package) = caller;
- $dad_rdr =~ s/^[^']+$/$package'$&/;
- $dad_wtr =~ s/^[^']+$/$package'$&/;
+ $dad_rdr =~ s/^[^']+$/$package'$&/ unless ref $dad_rdr;
+ $dad_wtr =~ s/^[^']+$/$package'$&/ unless ref $dad_wtr;
local($kid_rdr) = ++$fh;
local($kid_wtr) = ++$fh;