Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^6: Introspecting the current Perl file via DATA, even w/o DATA? (perl5db.pl)

by LanX (Sage)
on Feb 05, 2016 at 16:19 UTC ( #1154488=note: print w/replies, xml ) Need Help??


in reply to Re^5: Introsepcting the current Perl file via DATA, even w/o DATA? (perl5db.pl)
in thread Introspecting the current Perl file via DATA, even w/o DATA?

> Is that good enough for you?

yes, I knew I can count on your collaboration! ;)

> Now, the thing is, you have to set $^P before the file (test.pm in this case) is even opened.

I think one could trick that², the question is rather about other penalties included.

... let's have a look into perlvar#$^P ...

x400 Save source code lines into @{"_<$filename"} .

OK this doesn't look to expensive ... benchmark needed.

(too busy now ;-)

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

footnotes

²) for instance IIRC it's possible to configure global setting for your perl interpreter.

Log In?
Username:
Password:

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

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



    Results (80 votes). Check out past polls.

    Notices?