|
|
| Think about Loose Coupling | |
| PerlMonks |
Re: eval('__PACKAGE__') is always main?!!!by hossman (Parson) |
| on Dec 23, 2004 at 20:14 UTC ( #417202=note: print w/ replies, xml ) | Need Help?? |
|
this is odd...
Update: d'oh! ... that's what i get for trusting someone else's test case without looking at it closely. what makes the -e version "work" is definitely the quotes, perl is seeing it as...
...in which case the __PACKAGE__ gets interpolated before the eval.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||