Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: How do I know if I'm in a BEGIN block?

by LanX (Cardinal)
on Oct 30, 2009 at 02:31 UTC ( #804092=note: print w/replies, xml ) Need Help??


in reply to How do I know if I'm in a BEGIN block?

It should be possible straight away by attaching Attribute::Handlers to foo() which sets a flag or even modifies your code...

"it is possible to set up attribute handlers that are called at other points in the program's compilation or execution, by explicitly stating the phase (or phases) in which you wish the attribute handler to be called."

Cheers Rolf

  • Comment on Re: How do I know if I'm in a BEGIN block?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2021-06-15 20:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (73 votes). Check out past polls.

    Notices?