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.