Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: How Are Attributes Useful?by eric256 (Parson) |
on Mar 23, 2007 at 21:36 UTC ( [id://606352]=note: print w/replies, xml ) | Need Help?? |
I didn't realize till after compiling an example that this was a rather old post, but I'll post it anyway. Here is an example of using attributes to added debug information to a sub (printing out its @_ before and after execution) as well as a way to wrap some errors/warnings around methods. Both of these use Hook::LexWrap to warp extra code around the function being attributed...attributized, attributated?</code>
___________ Eric Hodges
In Section
Seekers of Perl Wisdom
|
|