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=ac6a91e377eee6870e1246e5986e0798ff177d73;hp=b3a15e993f676a7564095ef48ead2233e8df6212;hb=6aa26d86a67266d3d141bd1d9ed95f3cbbdd1b7c;hpb=4475b603333c8fb610ee1d802af0a006be4062bb diff --git a/lib/Eval/WithLexicals.pm b/lib/Eval/WithLexicals.pm index b3a15e9..ac6a91e 100644 --- a/lib/Eval/WithLexicals.pm +++ b/lib/Eval/WithLexicals.pm @@ -131,7 +131,7 @@ sub _eval_do { sub capture_list { my $pad_capture = \&Eval::WithLexicals::Cage::pad_capture; - my @names = grep defined && length && $_ ne '&', map $_->PV, grep $_->can('PV'), + my @names = grep defined && length > 1, map $_->PV, grep $_->can('PV'), svref_2object($pad_capture)->OUTSIDE->PADLIST->ARRAYelt(0)->ARRAY; $Eval::WithLexicals::current_code .= '+{ '.join(', ', map "'$_' => \\$_", @names).' };'