Skip Menu |

This queue is for tickets about the lexical-underscore CPAN distribution.

Report information
The Basics
Id: 108203
Status: resolved
Priority: 0/
Queue: lexical-underscore

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

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



Subject: Can't use global $_ in "my"
Test suite fails with perl 5.23.4: Output from '/usr/bin/make test': PERL_DL_NONLAZY=1 "/bbbike/perl-5.23.4/bin/perl5.23.4" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t Can't use global $_ in "my" at t/01basic.t line 12, near "my $_ " Can't use global $_ in "my" at t/01basic.t line 23, near "my $_ " Can't use global $_ in "my" at t/01basic.t line 28, near "my $_ " Execution of t/01basic.t aborted due to compilation errors. # Looks like your test exited with 255 before it could output anything. t/01basic.t ..... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 6/6 subtests Probably due to this change, mentioned in perl5.23.4's perldelta.pod: Lexical $_ has been removed "my $_" was introduced in Perl 5.10, and subsequently caused much confusion with no obvious solution. In Perl 5.18.0, it was made experimental on the theory that it would either be removed or redesigned in a less confusing (but backward-incompatible) way. Over the following years, no alternatives were proposed. The feature has now been removed and will fail to compile.
On 2015-10-30 11:56:10, SREZIC wrote: Show quoted text
> Test suite fails with perl 5.23.4: > > Output from '/usr/bin/make test': > > PERL_DL_NONLAZY=1 "/bbbike/perl-5.23.4/bin/perl5.23.4" "- > MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef > *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" > t/*.t > Can't use global $_ in "my" at t/01basic.t line 12, near "my $_ " > Can't use global $_ in "my" at t/01basic.t line 23, near "my $_ " > Can't use global $_ in "my" at t/01basic.t line 28, near "my $_ " > Execution of t/01basic.t aborted due to compilation errors. > # Looks like your test exited with 255 before it could output > anything. > t/01basic.t ..... > Dubious, test returned 255 (wstat 65280, 0xff00) > Failed 6/6 subtests > > > Probably due to this change, mentioned in perl5.23.4's perldelta.pod: > > Lexical $_ has been removed > "my $_" was introduced in Perl 5.10, and subsequently caused much > confusion with no obvious solution. In Perl 5.18.0, it was made > experimental on the theory that it would either be removed or > redesigned > in a less confusing (but backward-incompatible) way. Over the > following > years, no alternatives were proposed. The feature has now been > removed > and will fail to compile.
A possible patch (make 5.23.4 and later behave like 5.8.9 and earlier) can be found at: http://cpan.cpantesters.org/authors/id/S/SR/SREZIC/patches/lexical-underscore-0.003-RT108203.patch
Fixed in 0.004.