Think about Loose Coupling | |
PerlMonks |
Re: Core module: Attribute::Handlers behaviourby moritz (Cardinal) |
on Oct 20, 2012 at 07:11 UTC ( [id://1000107]=note: print w/replies, xml ) | Need Help?? |
As a clarification, if you write
Then your sub TRACE will be called once if you write
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.
In Section
Seekers of Perl Wisdom
|
|