CC: | <kane [...] cpan.org> |
Subject: | IPC::Cmd 0.40 blank in command |
Date: | Wed, 9 Jan 2008 11:01:22 +0100 |
To: | <bug-ipc-cmd [...] rt.cpan.org> |
From: | "Gsandtner Michael" <michael.gsandtner [...] wien.gv.at> |
Here is a bugreport for IPC::Cmd 0.40:
IPC::Cmd::run(command => [ "ls", "a b" ]);
does not find the file with blank in name.
Here is a patch for that problem (only for _open3_run used by us; I assume for _ipc_run and _system_run it should be changed similarly)
*** IPC/Cmd-orig.pm Wed Jan 9 10:46:30 2008
--- IPC/Cmd-patched.pm Wed Jan 9 10:39:17 2008
***************
*** 361,367 ****
### in case there are pipes in there;
### IPC::Open3 will call exec and exec will do the right thing
$ok = __PACKAGE__->_open3_run(
! ( ref $cmd ? "@$cmd" : $cmd ),
$_out_handler, $_err_handler, $verbose
);
--- 361,368 ----
### in case there are pipes in there;
### IPC::Open3 will call exec and exec will do the right thing
$ok = __PACKAGE__->_open3_run(
! # ( ref $cmd ? "@$cmd" : $cmd ),
! $cmd,
$_out_handler, $_err_handler, $verbose
);
***************
*** 421,427 ****
'<&STDIN',
(IS_WIN32 ? '>&STDOUT' : $kidout),
(IS_WIN32 ? '>&STDERR' : $kiderror),
! $cmd
);
### use OUR stdin, not $kidin. Somehow,
--- 422,429 ----
'<&STDIN',
(IS_WIN32 ? '>&STDOUT' : $kidout),
(IS_WIN32 ? '>&STDERR' : $kiderror),
! ( ref $cmd ? @$cmd : $cmd ),
! # $cmd
);
### use OUR stdin, not $kidin. Somehow,
Best regards
Michael Gsandtner
Magistrat der Stadt Wien, MA 14, Referat Infrastruktur
A 1082 Wien, Rathausstraße 1
Email: michael.gsandtner@wien.gv.at
Telefon: +43 1 4000 91640
Mobil: +43 676 8118 91640