Skip Menu |

This queue is for tickets about the Eval-WithLexicals CPAN distribution.

Report information
The Basics
Id: 101086
Status: resolved
Priority: 0/
Queue: Eval-WithLexicals

People
Owner: ether [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.003001
Fixed in: 1.003002



Subject: Test failure with perl 5.21.7
The test suite passes with perl 5.21.6, but fails with 5.21.7: PERL_DL_NONLAZY=1 "/opt/perl-5.21.7/bin/perl5.21.7" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/hints.t ... ok # Failed test 'Lexical stored ok' # at t/simple.t line 13. # Structures begin differing at: # $got->{$x} = Does not exist # $expected->{$x} = SCALAR(0x277f7d8) Global symbol "$x" requires explicit package name (did you forget to declare "my $x"?) at (eval) line 1. BEGIN not safe after errors--compilation aborted at (eval) line 3. # Tests were run but no plan was declared and done_testing() was not seen. # Looks like your test exited with 255 just after 2. t/simple.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/2 subtests
On Mon Dec 22 14:52:32 2014, SREZIC wrote: Show quoted text
> The test suite passes with perl 5.21.6, but fails with 5.21.7: > > PERL_DL_NONLAZY=1 "/opt/perl-5.21.7/bin/perl5.21.7" "- > MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef > *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" > t/*.t > t/hints.t ... ok > > # Failed test 'Lexical stored ok' > # at t/simple.t line 13. > # Structures begin differing at: > # $got->{$x} = Does not exist > # $expected->{$x} = SCALAR(0x277f7d8) > Global symbol "$x" requires explicit package name (did you forget to > declare "my $x"?) at (eval) line 1. > BEGIN not safe after errors--compilation aborted at (eval) line 3. > # Tests were run but no plan was declared and done_testing() was not > seen. > # Looks like your test exited with 255 just after 2. > t/simple.t .. > Dubious, test returned 255 (wstat 65280, 0xff00) > Failed 1/2 subtests
Patch.
Subject: open_FsI5DW6O.txt
diff -rup Eval-WithLexicals-1.003001-fdwIjF-orig/lib/Eval/WithLexicals.pm Eval-WithLexicals-1.003001-fdwIjF/lib/Eval/WithLexicals.pm --- Eval-WithLexicals-1.003001-fdwIjF-orig/lib/Eval/WithLexicals.pm 2014-12-22 14:35:47.000000000 -0800 +++ Eval-WithLexicals-1.003001-fdwIjF/lib/Eval/WithLexicals.pm 2014-12-22 14:38:45.000000000 -0800 @@ -131,7 +131,7 @@ sub _eval_do { sub capture_list { my $pad_capture = \&Eval::WithLexicals::Cage::pad_capture; - my @names = grep $_ ne '&', map $_->PV, grep $_->isa('B::PV'), + my @names = grep defined && $_ ne '&', map $_->PV, grep $_->can('PV'), svref_2object($pad_capture)->OUTSIDE->PADLIST->ARRAYelt(0)->ARRAY; $Eval::WithLexicals::current_code .= '+{ '.join(', ', map "'$_' => \\$_", @names).' };'
Thanks, released as 1.003002!