From: Matt S Trout Date: Sun, 5 Dec 2010 16:43:02 +0000 (+0000) Subject: add test to check non-capture of out of scope lexical X-Git-Tag: v1.000000~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FEval-WithLexicals.git;a=commitdiff_plain;h=4d546654611503afe4282e5a4a4e7e291101d9bb add test to check non-capture of out of scope lexical --- diff --git a/t/simple.t b/t/simple.t index 22ea7c4..d529ac8 100644 --- a/t/simple.t +++ b/t/simple.t @@ -33,4 +33,10 @@ is_deeply( 'Inner scope and other lexical ok' ); +is_deeply( + [ keys %{$eval->lexicals} ], + [ '$x' ], + 'No capture of invisible $y' +); + done_testing;