Bug#533380: perl-modules: IPC::Cmd fails with commands formatted as arrayrefs
Robert Buels
rmb32 at cornell.edu
Wed Jun 17 00:04:31 UTC 2009
Package: perl-modules
Version: 5.10.0-23
Severity: important
Tags: patch
test case:
perl -MIPC::Cmd=run -MFatal=run -e 'run(verbose => 1, command => [@ARGV] )' echo foo
should output:
Running [echo, foo]...
foo
This is fixed upstream as of IPC::Cmd version 0.41_01. Current
packaged version is 0.40_1.
Patch to upgrade IPC::Cmd to 0.41_01:
16c16
< $VERSION = '0.40_1';
---
> $VERSION = '0.41_01';
29a30
> use Text::ParseWords qw[shellwords];
129,130c130,131
< ### todo, win32 also does not have fork, so need to do more research.
< return 0 if IS_VMS;
---
> ### XXX todo, win32 also does not have fork, so need to do more research.
> return if IS_VMS;
132,133c133,134
< ### ipc::open3 works on every platform, but it can't capture buffers
< ### on win32 :(
---
> ### ipc::open3 works on every non-VMS platform platform, but it can't
> ### capture buffers on win32 :(
305c306
<
---
>
310a312,314
> ### strip any empty elements from $cmd if present
> $cmd = [ grep { length && defined } @$cmd ] if ref $cmd;
>
368,369c372
< ( ref $cmd ? "@$cmd" : $cmd ),
< $_out_handler, $_err_handler, $verbose
---
> $cmd, $_out_handler, $_err_handler, $verbose
423c426,427
<
---
> ### dont stringify @$cmd, so spaces in filenames/paths are
> ### treated properly
428c432
< $cmd
---
> ( ref $cmd ? @$cmd : $cmd ),
531c535,536
< [ split / +/ ]
---
> # [ split / +/ ]
> [ map { m/\ / ? qq{'$_'} : $_ } shellwords($cmd) ]
-- System Information:
Debian Release: 5.0
APT prefers jaunty-updates
APT policy: (500, 'jaunty-updates'), (500, 'jaunty-security'), (500, 'jaunty')
Architecture: i386 (i686)
Kernel: Linux 2.6.28-11-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages perl-modules depends on:
ii perl 5.10.0-19ubuntu1 Larry Wall's Practical Extraction
perl-modules recommends no packages.
perl-modules suggests no packages.
-- no debconf information
More information about the Perl-maintainers
mailing list