Skip Menu |

This queue is for tickets about the ExtUtils-Command CPAN distribution.

Report information
The Basics
Id: 33926
Status: resolved
Priority: 0/
Queue: ExtUtils-Command

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

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



CC: MSCHWERN [...] cpan.org
Subject: Test::Simple breaks ExtUtils::Command
I hope Schwern will tell us who'se blame it is. In any case I observe a broken ExtUtils::Command test with Test::Simple 0.78. Downgrading to 0.75 fixes it again. Schwern's recent posting to use.perl.org may be related. Schwern? (I'll ask Schwern in private mail if he has received the CC)
Subject: Re: [rt.cpan.org #33926] Test::Simple breaks ExtUtils::Command
Date: Sun, 09 Mar 2008 23:20:49 -0700
To: bug-ExtUtils-Command [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
Andreas Koenig via RT wrote: Show quoted text
> I hope Schwern will tell us who'se blame it is. In any case I observe a > broken ExtUtils::Command test with Test::Simple 0.78. Downgrading to > 0.75 fixes it again. > > Schwern's recent posting to use.perl.org may be related. > > Schwern?
The bug fix in Test::More fixed in 0.77 revealed a bug in ExtUtils::Command. http://www.nntp.perl.org/group/perl.qa/2008/03/msg10460.html *CORE::GLOBAL::exit = sub { CORE::exit(@_) unless caller eq 'ExtUtils::Command'; my $exit = $_[0] || 0; die "exit: $exit\n"; }; exit() has a prototype of ;$ so it interprets @_ in scalar context. If you give it an argument it exits with 1. The test is now failing correctly. -- I am somewhat preoccupied telling the laws of physics to shut up and sit down. -- Vaarsuvius, "Order of the Stick" http://www.giantitp.com/comics/oots0107.html
On Mon Mar 10 02:21:21 2008, schwern@pobox.com wrote: Show quoted text
> Andreas Koenig via RT wrote:
> > I hope Schwern will tell us who'se blame it is. In any case I observe a > > broken ExtUtils::Command test with Test::Simple 0.78. Downgrading to > > 0.75 fixes it again. > > > > Schwern's recent posting to use.perl.org may be related. > > > > Schwern?
> > The bug fix in Test::More fixed in 0.77 revealed a bug in
ExtUtils::Command. Show quoted text
> http://www.nntp.perl.org/group/perl.qa/2008/03/msg10460.html > > *CORE::GLOBAL::exit = sub { > CORE::exit(@_) unless caller eq 'ExtUtils::Command'; > > my $exit = $_[0] || 0; > die "exit: $exit\n"; > }; > > exit() has a prototype of ;$ so it interprets @_ in scalar context.
If you Show quoted text
> give it an argument it exits with 1. The test is now failing correctly. >
Does this suggest the following patch to Shell::Command? =================================================================== --- Command.pm (revision 10908) +++ Command.pm (working copy) @@ -6,7 +6,7 @@ # takes effect. BEGIN { *CORE::GLOBAL::exit = sub { - CORE::exit(@_) unless caller eq 'ExtUtils::Command'; + CORE::exit($_[0]) unless caller eq 'ExtUtils::Command'; my $exit = $_[0] || 0; die "exit: $exit\n"; With this, the shell_exit test passes for both Test::Simple version 0.78 and earlier versions.
Subject: Re: [rt.cpan.org #33926] Test::Simple breaks ExtUtils::Command
Date: Wed, 12 Mar 2008 06:52:28 -0700
To: bug-ExtUtils-Command [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
RKOBES via RT wrote: Show quoted text
>> exit() has a prototype of ;$ so it interprets @_ in scalar context.
> If you
>> give it an argument it exits with 1. The test is now failing correctly.
> > Does this suggest the following patch to Shell::Command?
Yep. Show quoted text
> =================================================================== > --- Command.pm (revision 10908) > +++ Command.pm (working copy) > @@ -6,7 +6,7 @@ > # takes effect. > BEGIN { > *CORE::GLOBAL::exit = sub { > - CORE::exit(@_) unless caller eq 'ExtUtils::Command'; > + CORE::exit($_[0]) unless caller eq 'ExtUtils::Command'; > > my $exit = $_[0] || 0; > die "exit: $exit\n"; > > > With this, the shell_exit test passes for both Test::Simple version 0.78 > and earlier versions.
-- 124. Two drink limit does not mean first and last. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/
On Wed Mar 12 10:26:40 2008, schwern@pobox.com wrote: Show quoted text
> RKOBES via RT wrote:
> >> exit() has a prototype of ;$ so it interprets @_ in scalar context.
> > If you
> >> give it an argument it exits with 1. The test is now failing
correctly. Show quoted text
> > > > Does this suggest the following patch to Shell::Command?
> > Yep. > >
> > =================================================================== > > --- Command.pm (revision 10908) > > +++ Command.pm (working copy) > > @@ -6,7 +6,7 @@ > > # takes effect. > > BEGIN { > > *CORE::GLOBAL::exit = sub { > > - CORE::exit(@_) unless caller eq 'ExtUtils::Command'; > > + CORE::exit($_[0]) unless caller eq 'ExtUtils::Command'; > > > > my $exit = $_[0] || 0; > > die "exit: $exit\n"; > > > > > > With this, the shell_exit test passes for both Test::Simple version 0.78 > > and earlier versions.
Thanks very much, and also thanks for tracking this down. This is fixed in ExtUtils-Command-1.14, which will be on CPAN shortly.