in reply to Re: Introsepcting the current Perl file via DATA, even w/o DATA?
in thread Introspecting the current Perl file via DATA, even w/o DATA?

> 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

C:\>perl -e "print __FILE__" -e

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!