Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: Introsepcting the current Perl file via DATA, even w/o DATA?

by Anonymous Monk
on Feb 05, 2016 at 02:28 UTC ( #1154461=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1154461]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2022-05-22 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?