What are you trying to report? Are you trying to emit something for every executed function? In that case, close over the name of the wrapped function:
my @mars_subs = qw( add increment ); for my $sub (@mars_subs) { wrap $sub, pre => sub { print "Calling '$sub'\n"; }; }
Improve your skills with Modern Perl: the free book.
In reply to Re^3: Changing every subroutine in many perl scripts
by chromatic
in thread Changing every subroutine in many perl scripts
by nitin1704
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |