From ea87ae30b28ea730a13b7888089b708bdb0f0991 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Mon, 6 Jun 2011 16:16:37 +0200 Subject: [PATCH] Generalise IPC::Open3::xopen() to $n-argument open. Previously it could only perform 2 argument open. --- ext/IPC-Open3/lib/IPC/Open3.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/IPC-Open3/lib/IPC/Open3.pm b/ext/IPC-Open3/lib/IPC/Open3.pm index cdd47c3..14c5605 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 { -- 2.7.4