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;
}
}
}
Thanks
Marcos
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]