From: [EMAIL PROTECTED]
> I need to do some kind of generic log trow my code, this will be used
> just in debug mode.
>
> I has sinking something like.
>
> sub prepareLog{
> foreach my $functionName (xpto()) {
> next if not toLog($functionName);
> *$functionName = sub {
> print "start: $functionName\n";
> my @output = &{*$functionName}(@_) if wantarray;
> my $output = &{*$functionName}(@_) if not wantarray;
>
> print "end: $functionName\n";
> return wantarray ? @output: $output;
> }
> }
> }
use Devel::TraceSubs
You can find it on CPAN
Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]