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=c5343b06b4eed957cddb11c3e6c0df621c2ace34;hp=b3a15e993f676a7564095ef48ead2233e8df6212;hb=658f6c563d745506a79cde37038547886ff48155;hpb=f19eca699a0d4520a3e6d3a3f7dd6c134ae8749d diff --git a/lib/Eval/WithLexicals.pm b/lib/Eval/WithLexicals.pm index b3a15e9..c5343b0 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.003005'; # 1.3.5 +our $VERSION = '1.003006'; # v1.3.6 $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 && 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).' };'