Skip Menu |

This queue is for tickets about the Probe-Perl CPAN distribution.

Report information
The Basics
Id: 85204
Status: resolved
Priority: 0/
Queue: Probe-Perl

People
Owner: Nobody in particular
Requestors: kmx [...] cpan.org
Cc: gregoa [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Win32 failure "List form of pipe open not implemented"
Hi,

I have experienced the following failure on perl 5.16.1 (MS Windows,32 bit)
Building and testing Probe-Perl-0.02 ... cp lib/Probe/Perl.pm blib\lib\Probe\Perl.pm
Z:\strawberry32_5161\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/author-critic.t .. skipped: these tests are for testing by the author
t/basic.t .......... 1/19 List form of pipe open not implemented at C:\Users\kmx\.cpanm\work\1368340802.5472\Probe-Perl-0.02\blib\lib/Probe/Perl.pm line 55.
t/basic.t .......... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 7/19 subtests

Test Summary Report
-------------------
t/basic.t        (Wstat: 65280 Tests: 12 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 19 tests but ran 12.
Files=2, Tests=12,  0 wallclock secs ( 0.06 usr +  0.05 sys =  0.11 CPU)
Result: FAIL

--
kmx
I'm attaching a patch which works for me under Strawberry Perl 5.18.0.1. (Idea taken from http://www.perlmonks.org/?node_id=902197 ) Cheers, gregor
Subject: 85204.diff
--- a/lib/Probe/perl.pm 2013-04-19 13:38:14.000000000 +0200 +++ b/lib/Probe/perl.pm 2013-06-03 11:07:08.263619700 +0200 @@ -52,7 +52,8 @@ } sub _backticks { - open my $fh, '-|', @_ or die $!; + my $cmd = join (" ", @_); + open my $fh, '-|', $cmd or die $!; return wantarray ? <$fh> : do {local $/=undef; <$fh>}; }
Hi Gregor, I've actually already patched this in the git repository (https://github.com/kenahoo/Probe-Perl) but haven't really tested it on Windows. It would be helpful if you could give it a shot, if possible. Thanks.
Subject: Re: [rt.cpan.org #85204] Win32 failure "List form of pipe open not implemented"
Date: Mon, 3 Jun 2013 17:47:16 +0200
To: Ken Williams via RT <bug-Probe-Perl [...] rt.cpan.org>
From: gregor herrmann <gregoa [...] debian.org>
On Mon, 03 Jun 2013 11:39:05 -0400, Ken Williams via RT wrote: Show quoted text
> I've actually already patched this in the git repository > (https://github.com/kenahoo/Probe-Perl) but haven't really tested > it on Windows. It would be helpful if you could give it a shot, if > possible.
I'll try to have a look tomorrow at the Windows machine at the office. Cheers, gregor -- .''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: Bettina Wegner: Schlaflied
Download signature.asc
application/pgp-signature 836b

Message body not shown because it is not plain text.

Bad news: with 8d3b71f applied on top of 0.02 the test still fails with the same error: t/basic.t .......... 1/19 List form of pipe open not implemented at C:\Dokumente und Einstellungen\gregor\Desktop\probe-perl\Probe-Perl-0.02\blib\lib/Probe/Perl.pm line 58. with line 58 after applying the commit still being the if (open my $fh, '-|', $perl, @_) { I guess you either have to wrap this in an eval() or drop the list form pipe completely. (Quick dirty sketch using eval() attached, this passes on Win32 for me.) Cheers, gregor
Subject: 85204-eval.diff
--- blib/lib/Probe/Perl.pm.orig 2013-06-04 08:23:00.000000000 +0200 +++ blib/lib/Probe/Perl.pm 2013-06-04 08:45:40.050478300 +0200 @@ -55,7 +55,9 @@ my $perl = shift; return unless -e $perl; - if (open my $fh, '-|', $perl, @_) { + my $fh; + eval {open $fh, '-|', $perl, @_}; + unless ($@) { return <$fh> if wantarray; return do {local $/=undef; <$fh>}; }
Sounds good - I also needed to add a die() in the eval{} for the Unix case. Change is now pushed to github if you want to make a final test.
Subject: Re: [rt.cpan.org #85204] Win32 failure "List form of pipe open not implemented"
Date: Tue, 4 Jun 2013 18:20:27 +0200
To: Ken Williams via RT <bug-Probe-Perl [...] rt.cpan.org>
From: gregor herrmann <gregoa [...] debian.org>
On Tue, 04 Jun 2013 12:08:58 -0400, Ken Williams via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=85204 > > > Sounds good - I also needed to add a die() in the eval{} for the Unix case. Change is now pushed to github
Cool, thanks Show quoted text
> if you want to make a final test.
I can (again :)) try tomorrow. Cheers, gregor -- .''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: Richard O'Brian: Science Fiction - Double Feature
Download signature.asc
application/pgp-signature 836b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #85204] Win32 failure "List form of pipe open not implemented"
Date: Wed, 5 Jun 2013 08:17:50 +0200
To: Ken Williams via RT <bug-Probe-Perl [...] rt.cpan.org>
From: gregor herrmann <gregoa [...] debian.org>
On Tue, 04 Jun 2013 12:08:58 -0400, Ken Williams via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=85204 > > > Sounds good - I also needed to add a die() in the eval{} for the Unix case.
Show quoted text
> Change is now pushed to github if you want to make a final test.
Works as expected; thanks. Cheers, gregor -- .''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- BOFH excuse #211: Lightning strikes.
I applied the patch from the git repo, but then got test failures on perl-5.10 on Unix.  No problem on 5.8, 5.12, 5.14, ,,,

That perl seems to have problem with:

  return do { ... };

The attached patch is a workaround that avoid this problem.
Subject: Probe-Perl-002-perl-5.10.patch
From 73c3c54ec404f8ee0653fcb62ba34705562a2219 Mon Sep 17 00:00:00 2001 From: Gisle Aas <gisle@activestate.com> Date: Wed, 7 Aug 2013 14:30:22 -0700 Subject: [PATCH] Workaround for perl-5.10.1 brokenness --- lib/Probe/Perl.pm | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/Probe/Perl.pm b/lib/Probe/Perl.pm index 3d8b404..64a0a12 100644 --- a/lib/Probe/Perl.pm +++ b/lib/Probe/Perl.pm @@ -56,7 +56,8 @@ sub _backticks { eval {open $fh, '-|', $perl, @_ or die $!}; if (!$@) { return <$fh> if wantarray; - return do {local $/=undef; <$fh>}; + my $tmp = do {local $/=undef; <$fh>}; + return $tmp; } # Quoting only happens on the path to perl - I control the rest of -- 1.7.0.5
Thanks Gisle, applied. Released with version 0.03.