X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FEval-WithLexicals.git;a=blobdiff_plain;f=lib%2FEval%2FWithLexicals.pm;fp=lib%2FEval%2FWithLexicals.pm;h=0f9c2facb46129732e2c1116ce33e1122a2dd612;hp=79fba319f5a1d320fc2ba3ef7175ee2b520c5cb8;hb=a214c345e2de0ddd1e2ab205d942e2b1d7bb47b1;hpb=fb37a6a203f433bb192b039c179b83358330fba7 diff --git a/lib/Eval/WithLexicals.pm b/lib/Eval/WithLexicals.pm index 79fba31..0f9c2fa 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 && $_ 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).' };'