From: David Leadbeater Date: Tue, 11 Jan 2011 00:13:07 +0000 (+0000) Subject: Add a #line directive to identify the source of an error X-Git-Tag: v1.001000~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FEval-WithLexicals.git;a=commitdiff_plain;h=e764ce9b0e0a0dbb3b51ecab734b0a6bf111b6c8 Add a #line directive to identify the source of an error --- diff --git a/Changes b/Changes index 5b1fd41..7ebf515 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,4 @@ + - Add a #line directive so it's clearer where errors occurred - Filter out lexicals called '&' since these are anon subs 1.0.0 2010-12-05 17:04:00 diff --git a/lib/Eval/WithLexicals.pm b/lib/Eval/WithLexicals.pm index 6571291..c7b5fca 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() }