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=bd70d692773be91b94e8188c9ae7fbd532c1bc97;hp=1a3168f81a5d6512d48f9407d1e4f8ed9fa9a042;hb=9a82ac009ea216fd815e317f0155fe82584f9bf3;hpb=8d08003970646fdf7f5174dbed91bd7b439f3002 diff --git a/lib/Eval/WithLexicals.pm b/lib/Eval/WithLexicals.pm index 1a3168f..bd70d69 100644 --- a/lib/Eval/WithLexicals.pm +++ b/lib/Eval/WithLexicals.pm @@ -36,6 +36,7 @@ sub eval { ${setup} sub Eval::WithLexicals::Cage::current_line { package ${package}; +#line 1 "(eval)" ${to_eval} ;sub Eval::WithLexicals::Cage::pad_capture { } BEGIN { Eval::WithLexicals::Util::capture_list() } @@ -92,7 +93,7 @@ sub _eval_do { sub capture_list { my $pad_capture = \&Eval::WithLexicals::Cage::pad_capture; - my @names = map $_->PV, grep $_->isa('B::PV'), + my @names = grep $_ ne '&', map $_->PV, grep $_->isa('B::PV'), svref_2object($pad_capture)->OUTSIDE->PADLIST->ARRAYelt(0)->ARRAY; $Eval::WithLexicals::current_code .= '+{ '.join(', ', map "'$_' => \\$_", @names).' };' @@ -184,7 +185,7 @@ Matt S. Trout =head1 CONTRIBUTORS -None required yet. Maybe this module is perfect (hahahahaha ...). +David Leadbeater =head1 COPYRIGHT