> outputs: > > notDB-outer > > (which is what I expect). > Yes, this is right. 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?? I suppose it does. Because this is 'string eval' which: > is executed as a block within the lexical context of the current Perl program, any outer lexical variables are visible to it, and any package variable settings The 'eval' in DB package >doesn't see the usual surrounding lexical scope, but rather the scope of the first non-DB piece The first non-DB piece is 'main' package, thus __PACKAGE__ should return 'main' --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=133123Thread Previous | Thread Next