Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
In the end, I get a nice little summary of every sub routine run, with any sub routine called from that subroutine nested, and any little notes I wanted to see. so it would look likesub do_some_stuff { $debug .= qq(<h5 style="color:#c33;">SUB: do_some_stuff</h5><div sty +le="margin-left:20px;">); my $abc = qq(The foo bar boogie); (my $xyz = $abc) =~ s!foo!bar!; $xyz = &do_something_else($xyz); #pretend &do_some_other_stuff is ba +sically the same as &do_some_stuff $debug .= qq(XYZ: $xyz); $debug .= qq(</div><h5 style="color:#c33;">ENDSUB: do_some_stuff</h5 +>); return($xyz); } my $output = $template->output; $output .= qq(--Debug Info-- <pre>$debug</pre>); return($output);
SUB: do_some_stuff XYZ: The bar bar boogie SUB: do_some_other_stuff NOTE: did some other stuff ENDSUB: do_some_other_stuff ENDSUB: do_some_stuffI have two questions.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: modifying sub routine behaviour
by zengargoyle (Deacon) on Mar 12, 2003 at 09:23 UTC | |
by Anonymous Monk on Mar 12, 2003 at 10:02 UTC | |
|
Re: modifying sub routine behaviour
by Corion (Patriarch) on Mar 12, 2003 at 09:34 UTC | |
by PodMaster (Abbot) on Mar 12, 2003 at 09:39 UTC | |
|
Re: modifying sub routine behaviour
by robartes (Priest) on Mar 12, 2003 at 09:38 UTC | |
|
Re: modifying sub routine behaviour
by adrianh (Chancellor) on Mar 12, 2003 at 09:23 UTC | |
|
AOP?
by zby (Vicar) on Mar 12, 2003 at 09:18 UTC | |
by jdporter (Paladin) on Feb 19, 2008 at 20:08 UTC |