X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FEval-WithLexicals.git;a=blobdiff_plain;f=lib%2FEval%2FWithLexicals.pm;h=3f0a0e0d7033624317e446dcbd10bfb9008d6593;hp=79fba319f5a1d320fc2ba3ef7175ee2b520c5cb8;hb=1383802ee66409c639f0cc27fc63ecde578e977b;hpb=71ac67dae200ce265bb9cb6f17baf9963fe0b081 diff --git a/lib/Eval/WithLexicals.pm b/lib/Eval/WithLexicals.pm index 79fba31..3f0a0e0 100644 --- a/lib/Eval/WithLexicals.pm +++ b/lib/Eval/WithLexicals.pm @@ -4,7 +4,7 @@ use Moo; use Moo::Role (); use Sub::Quote; -our $VERSION = '1.003002'; # 1.3.2 +our $VERSION = '1.003003'; # 1.3.3 $VERSION = eval $VERSION; has lexicals => (is => 'rw', default => quote_sub q{ {} }); @@ -131,7 +131,7 @@ sub _eval_do { sub capture_list { my $pad_capture = \&Eval::WithLexicals::Cage::pad_capture; - my @names = grep defined && $_ ne '&', map $_->PV, grep $_->can('PV'), + my @names = grep defined && length && $_ ne '&', map $_->PV, grep $_->can('PV'), svref_2object($pad_capture)->OUTSIDE->PADLIST->ARRAYelt(0)->ARRAY; $Eval::WithLexicals::current_code .= '+{ '.join(', ', map "'$_' => \\$_", @names).' };'