develooper Front page | perl.perl5.porters | Postings from April 2018

Re: [perl #133123] eval '__PACKAGE__' in debug mode do not returnright package

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
April 21, 2018 15:44
Subject:
Re: [perl #133123] eval '__PACKAGE__' in debug mode do not returnright package
Message ID:
20180421154410.GH2839@iabyn.com
On Fri, Apr 20, 2018 at 01:17:53AM -0700, KES via RT wrote:
> Thus the EXPR which is evaled in 'DB' package sees 'main' package
> Does __PACKAGE__ will see also 'main' package or it will see 'DB' pacakge still??

You are conflating two completely different issues.

perl has a hack that affects how it looks up lexical (my) variables
in outer scopes when doing an eval, if the eval is run from within the DB
package.

This has nothing to do with __PACKAGE__, which is static and completely
unaffected by DB.


-- 
"Foul and greedy Dwarf - you have eaten the last candle."
    -- "Hordes of the Things", BBC Radio.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About