There's more than one way to do things | |
PerlMonks |
Tweaking 'return'.by eff_i_g (Curate) |
on Nov 22, 2005 at 21:40 UTC ( [id://510923]=perlquestion: print w/replies, xml ) | Need Help?? |
eff_i_g has asked for the wisdom of the Perl Monks concerning the following question:
Monkly Mentors,
I am logging the start and end of subroutine calls for easier debugging. I am doing this by manually placing a function at the start and end, like so: log_line('Begin (or End) call: sub_name'); This is great; however, I am starting to use return's within the routine and I have to repeat the above code before each return. Is there some Perlish way to tell 'return' to call a function and then do its thing? Thank You.
Back to
Seekers of Perl Wisdom
|
|