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

To clarify, the source filter thing should work, and maybe there is a way to make the file to stick around after BEGIN (without __DATA__), but in my opinion that's a bit too obscure and I don't see anything particularly complex or performance-intensive in just opening it again... but YMMV.
  • Comment on Re^4: Introsepcting the current Perl file via DATA, even w/o DATA?
  • Download Code

Replies are listed 'Best First'.
Re^5: Introsepcting the current Perl file via DATA, even w/o DATA?
by stevieb (Canon) on Feb 05, 2016 at 03:02 UTC
    I think it's the only way, and a quick open if done at the right time, won't penalize the objective.

    Update: What you've shown here is very intriguing. Why are you Anonymonk?

      Why are you Anonymonk?
      Well, considering that this is the only forum that I post on... I guess if I had to register, I wouldn't bother...
        so do it!

        considering that this is the only forum that I post on.. me bad, is the only thing we have in common!

        L*

        There are no rules, there are no thumbs..
        Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.