Skip Menu | You are currently an anonymous guest. | Login | Return to Main | About rt.cpan.org
 

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.

X Report information
Id: 33926
Status: resolved
Left: 0 min
Priority: 0/0
Queue: ExtUtils-Command

Owner: Nobody
Requestors: ANDK <ANDK [...] cpan.org>
Cc: MSCHWERN <mschwern [...] cpan.org>
AdminCc:

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



X History Display mode: Brief headersFull headers
#   Sun Mar 09 10:50:42 2008 ANDK - Ticket created  
CC: MSCHWERN[...]cpan.org
Subject: Test::Simple breaks ExtUtils::Command
[text/plain 292b]
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)

#   Mon Mar 10 02:21:21 2008 schwern[...]pobox.com - Correspondence added  
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>
[text/plain 909b]
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.
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

#   Mon Mar 10 02:21:22 2008 RT_System - Status changed from 'new' to 'open'  
#   Wed Mar 12 00:41:48 2008 RKOBES - Correspondence added  
[text/plain 1.3k]
On Mon Mar 10 02:21:21 2008, schwern[...]pobox.com wrote:
> 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.
> 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.
>

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.

#   Wed Mar 12 10:26:40 2008 schwern[...]pobox.com - Correspondence added  
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>
[text/plain 918b]
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.
>
> 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.


--
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/

#   Wed Mar 12 22:43:25 2008 RKOBES - Correspondence added  
[text/plain 983b]
On Wed Mar 12 10:26:40 2008, schwern[...]pobox.com wrote:
> 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.
> >
> > 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.


#   Wed Mar 12 22:43:58 2008 RKOBES - Status changed from 'open' to 'resolved'