Skip Menu |

This queue is for tickets about the IPC-Cmd CPAN distribution.

Report information
The Basics
Id: 40157
Status: resolved
Priority: 0/
Queue: IPC-Cmd

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc: ferreira [...] cpan.org
AdminCc:

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



CC: ferreira [...] cpan.org
Subject: IPC-Cmd-0.42 breaks Shell::Perl 0.0017
As the subject line says, upgrading from 0.40 to 0.42 breaks the version.t test of Shell-Perl-0.0017. It's a pity this was not detected earlier during the 0.41_* cycle. Binary search shows it happened between 0.41_02 and 0.41_04. I have not tried to determine the cause, HTH & Regards,
Subject: Re: [rt.cpan.org #40157] IPC-Cmd-0.42 breaks Shell::Perl 0.0017
Date: Sun, 19 Oct 2008 08:57:15 +0200
To: bug-IPC-Cmd [...] rt.cpan.org
From: "Jos I. Boumans" <jos [...] dwim.org>
On Oct 19, 2008, at 6:01 AM, Andreas Koenig via RT wrote: Show quoted text
> Sun Oct 19 00:01:17 2008: Request 40157 was acted upon. > Transaction: Ticket created by ANDK > Queue: IPC-Cmd > Subject: IPC-Cmd-0.42 breaks Shell::Perl 0.0017 > Broken in: 0.42 > Severity: Important > Owner: Nobody > Requestors: ANDK@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=40157 > > > > As the subject line says, upgrading from 0.40 to 0.42 breaks the > version.t test of Shell-Perl-0.0017. > > It's a pity this was not detected earlier during the 0.41_* cycle. > > Binary search shows it happened between 0.41_02 and 0.41_04. > > I have not tried to determine the cause,
That's an odd bug, but of course i'll look into it. Thanks for letting me know! -- Jos Boumans "Never ask a man what computer he uses. If it's a Mac, he'll tell you. If it's not, why embarrass him?" - Tom Clancy CPANPLUS http://cpanplus.sf.net
CC: ANDK [...] cpan.org, ferreira [...] cpan.org
Subject: Re: [rt.cpan.org #40157] IPC-Cmd-0.42 breaks Shell::Perl 0.0017
Date: Sat, 25 Oct 2008 11:04:32 -0200
To: bug-IPC-Cmd [...] rt.cpan.org
From: "Adriano Ferreira" <aferreira [...] shopzilla.com>
I've found that the issue was that Shell::Perl tests were relying in a behavior of $err output of run() that changed according to this bit of the diff between 0.41_02 and 0.41_04 (http://search.cpan.org/diff?from=IPC-Cmd-0.41_02&to=IPC-Cmd-0.41_04): - my $err = $?; - if ( $@ and ref $@ and $@->isa( ALARM_CLASS ) ) { - $ok = 0; - $err = $@; # the error code is an expired alarm + my $err; + unless( $ok ) { + ### alarm happened + if ( $@ and ref $@ and $@->isa( ALARM_CLASS ) ) { + $err = $@->(); # the error code is an expired alarm + + ### another error happened, set by the dispatch sub + } else { + $err = $self->error; + } The test unknowingly did: for my $switch ( '-v', '--version' ) { my ( $ok, $err, $full_buf, $out_buf, $err_buf ) = run( command => [ @pirl, $switch ] ); ok( $ok, "'pirl $switch' run ok" ); is( $err, 0, 'exited with 0' ); <<<<< HERE cmp_deeply( $out_buf, [ re(qr/\AThis is pirl/) ], 'printed version info' ); cmp_deeply( $err_buf, [], 'no output to STDERR' ); } where is( $err, 0, 'exited with 0' ); went wrong, because now $err returns undef. According to the docs, $err was previously an error code and now is an error message (which is supposed to hold something only if $ok is false). So if that's the correct interpretation, I will be changing this test to be: ok( !$err, 'no error' ); Thanks a lot, Andreas, for your precision that made much easier to find where the issue came from. Show quoted text
> Binary search shows it happened between 0.41_02 and 0.41_04.
Regards, Adriano Ferreira On Sun, Oct 19, 2008 at 4:56 AM, Jos I. Boumans via RT <bug-IPC-Cmd@rt.cpan.org> wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=40157 > > > > On Oct 19, 2008, at 6:01 AM, Andreas Koenig via RT wrote: >
>> Sun Oct 19 00:01:17 2008: Request 40157 was acted upon. >> Transaction: Ticket created by ANDK >> Queue: IPC-Cmd >> Subject: IPC-Cmd-0.42 breaks Shell::Perl 0.0017 >> Broken in: 0.42 >> Severity: Important >> Owner: Nobody >> Requestors: ANDK@cpan.org >> Status: new >> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=40157 > >> >> >> As the subject line says, upgrading from 0.40 to 0.42 breaks the >> version.t test of Shell-Perl-0.0017. >> >> It's a pity this was not detected earlier during the 0.41_* cycle. >> >> Binary search shows it happened between 0.41_02 and 0.41_04. >> >> I have not tried to determine the cause,
> > That's an odd bug, but of course i'll look into it. > > Thanks for letting me know! > > -- > Jos Boumans > > "Never ask a man what computer he uses. If it's a Mac, he'll > tell you. If it's not, why embarrass him?" - Tom Clancy > > CPANPLUS http://cpanplus.sf.net > > > >