Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Core module: Attribute::Handlers behaviour

by moritz (Cardinal)
on Oct 20, 2012 at 07:11 UTC ( #1000107=note: print w/replies, xml ) Need Help??


in reply to Core module: Attribute::Handlers behaviour

As a clarification, if you write
use Attribute::Handlers; sub TRACE :ATTR(CODE) { ... }

Then your sub TRACE will be called once if you write

sub mysub :TRACE { }

but it will not be called for each call of mysub.

So to achieve what you want, you have to write your TRACE function in a way that, if the appropriate configuration option is set, it wraps the function in a way that makes the tracing happen. Maybe Hook::LexWrap can be helpful for that purpose.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000107]
help
Chatterbox?
[Discipulus]: good morning monks!
[choroba]: Good afternoon!
[GrandFather]: Good evening
[choroba]: Anyone from the East coast to say Good night?
[Discipulus]: still off place choroba?
[choroba]: till the end of the week

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2017-02-27 07:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (376 votes). Check out past polls.