summaryrefslogtreecommitdiff
path: root/ext/IPC-Open3
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-06-06 16:16:37 +0200
committerNicholas Clark <nick@ccl4.org>2011-06-11 08:48:13 +0200
commitea87ae30b28ea730a13b7888089b708bdb0f0991 (patch)
treef5cbe4e006dabffe2f7b70afd9907b82ee2ab7e8 /ext/IPC-Open3
parent8025b67f4a91c89c84e9425f55ca42755a7d5530 (diff)
downloadperl-ea87ae30b28ea730a13b7888089b708bdb0f0991.tar.gz
Generalise IPC::Open3::xopen() to $n-argument open.
Previously it could only perform 2 argument open.
Diffstat (limited to 'ext/IPC-Open3')
-rw-r--r--ext/IPC-Open3/lib/IPC/Open3.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/IPC-Open3/lib/IPC/Open3.pm b/ext/IPC-Open3/lib/IPC/Open3.pm
index cdd47c31ec..14c56057e5 100644
--- a/ext/IPC-Open3/lib/IPC/Open3.pm
+++ b/ext/IPC-Open3/lib/IPC/Open3.pm
@@ -9,7 +9,7 @@ require Exporter;
use Carp;
use Symbol qw(gensym qualify);
-$VERSION = '1.10';
+$VERSION = '1.11';
@ISA = qw(Exporter);
@EXPORT = qw(open3);
@@ -175,7 +175,9 @@ sub xclose_on_exec {
# disallows a bareword while compiling under strict subs.
sub xopen {
- open $_[0], $_[1] or croak "$Me: open($_[0], $_[1]) failed: $!";
+ open $_[0], $_[1], @_[2..$#_] and return;
+ local $" = ', ';
+ carp "$Me: open(@_) failed: $!";
}
sub xclose {