Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Simple CPAN distribution.

Report information
The Basics
Id: 26013
Status: resolved
Priority: 0/
Queue: Test-Simple

People
Owner: Nobody in particular
Requestors: matthew [...] veradox.com
Cc:
AdminCc:

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



Subject: line_num() fails because of ExtUtils::MM_Unix::fixin()
t/tbt_04line_num fails because ExtUtils::MM_Unix is inserting a 3-line shell-escaper idiom, which breaks the hardcoded linenumbers in those tests. Incrementing the line numbers by 3 fixes the installation, but it begs bigger questions about what happens to line_num() when ExtUtils::MM is used in conjuntion with Test::Simple to install other packages that test for line numbers. One I ran across that accounts for the 3-newline insertion (by ExtUtils::MakeMaker) is MIME::Base64. http://svn.schwern.org/svn/CPAN/Test-Simple/trunk/t/tbt_04line_num.t
Subject: Re: [rt.cpan.org #26013] line_num() fails because of ExtUtils::MM_Unix::fixin()
Date: Sat, 31 Mar 2007 16:08:04 -0700
To: bug-Test-Simple [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
Matthew Wilson via RT wrote: Show quoted text
> Sat Mar 31 13:12:45 2007: Request 26013 was acted upon. > Transaction: Ticket created by WILSON > Queue: Test-Simple > Subject: line_num() fails because of ExtUtils::MM_Unix::fixin() > Broken in: 0.70 > Severity: Important > Owner: Nobody > Requestors: matthew@veradox.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=26013 > > > > t/tbt_04line_num fails because ExtUtils::MM_Unix is inserting a 3-line > shell-escaper idiom, which breaks the hardcoded linenumbers in those > tests. > > Incrementing the line numbers by 3 fixes the installation, but it begs > bigger questions about what happens to line_num() when ExtUtils::MM is > used in conjuntion with Test::Simple to install other packages that test > for line numbers. One I ran across that accounts for the 3-newline > insertion (by ExtUtils::MakeMaker) is MIME::Base64. > > http://svn.schwern.org/svn/CPAN/Test-Simple/trunk/t/tbt_04line_num.t
One way around this sort of problem is to use the #line directive to force the line numbers to be what you want. Another is to use __LINE__ instead of hard coded line numbers. But that's not really the problem. Why is fixin touching that file at all? Its a test file, MakeMaker should not be doing anything with it but running it. Could you send me your Makefile please? I think someone mucked with your MakeMaker.
From: matthew [...] veradox.com
On Sat Mar 31 19:08:41 2007, schwern@pobox.com wrote: Show quoted text
> Matthew Wilson via RT wrote:
> > Sat Mar 31 13:12:45 2007: Request 26013 was acted upon. > > Transaction: Ticket created by WILSON > > Queue: Test-Simple > > Subject: line_num() fails because of ExtUtils::MM_Unix::fixin() > > Broken in: 0.70 > > Severity: Important > > Owner: Nobody > > Requestors: matthew@veradox.com > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=26013 > > > > > > > t/tbt_04line_num fails because ExtUtils::MM_Unix is inserting a 3-
> line
> > shell-escaper idiom, which breaks the hardcoded linenumbers in those > > tests. > > > > Incrementing the line numbers by 3 fixes the installation, but it
> begs
> > bigger questions about what happens to line_num() when ExtUtils::MM
> is
> > used in conjuntion with Test::Simple to install other packages that
> test
> > for line numbers. One I ran across that accounts for the 3-newline > > insertion (by ExtUtils::MakeMaker) is MIME::Base64. > > > > http://svn.schwern.org/svn/CPAN/Test-Simple/trunk/t/tbt_04line_num.t
> > One way around this sort of problem is to use the #line directive to > force the > line numbers to be what you want. Another is to use __LINE__ instead > of hard > coded line numbers. > > But that's not really the problem. > > Why is fixin touching that file at all? Its a test file, MakeMaker > should not > be doing anything with it but running it. > > Could you send me your Makefile please? I think someone mucked with > your > MakeMaker. >
Oh. I thought to take a look at the build output, and (I was using cpan2rpm, oops!) it was calling ME->fixin(\@ARGV) or something like that as an argument to Makefile.PL. cpan2rpm line 615 # fixes the #! so perl can be found (and deps get made ok) $info->{fixin} = <<EOF; grep -rsl '^#!.*perl' . | grep -v '\.bak\$' |xargs --no-run-if-empty \\ %__perl -MExtUtils::MakeMaker -e 'MY->fixin(\@ARGV)' EOF
From: MSCHWERN [...] cpan.org
On Sat Mar 31 19:15:04 2007, WILSON wrote: Show quoted text
> Oh. I thought to take a look at the build output, and (I was using > cpan2rpm, oops!) it was calling ME->fixin(\@ARGV) or something like that > as an argument to Makefile.PL. > > cpan2rpm line 615 > # fixes the #! so perl can be found (and deps get made ok) > > $info->{fixin} = <<EOF; > grep -rsl '^#!.*perl' . | > grep -v '\.bak\$' |xargs --no-run-if-empty \\ > %__perl -MExtUtils::MakeMaker -e 'MY->fixin(\@ARGV)' > EOF >
I'm really not sure why they felt this was necessary. MakeMaker already makes everything that needs to be executable. Oh well, take it up with the cpan2rpm folks.