Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> I agree with AnonymousMonk, that you're going to have to load __FILE__. Do it in BEGIN, stash the results, and deal with the penalty.
The penalty of reopening a file might be minimal nowadays, especially if it is still cached by the filesystem/ harddisk, but ... ... I'm not sure if __FILE__ is always holding something "openable". For instance consider the eval flag
Cheers Rolf
In reply to Re^2: Introspecting the current Perl file via DATA, even w/o DATA? ( __FILE__ )
by LanX
|
|