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=e33667ad498d8c79dcf823380176307ca12185f5;hp=1dd6edb1441090f375f91c8214ec9ab8cc3c8c03;hb=6c5943a0c39bcd09028acc54a4bbe81e6d85a89f;hpb=e8f160819f87f43990046b2e95f521b93ed6feb1 diff --git a/lib/Eval/WithLexicals.pm b/lib/Eval/WithLexicals.pm index 1dd6edb..e33667a 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.003000'; # 1.3.0 +our $VERSION = '1.003004'; # 1.3.4 $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 $_ ne '&', map $_->PV, grep $_->isa('B::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).' };'