This one only abuses subroutines in your main package. Alter as desired. :-)foreach my $used (keys %main::) { no strict; if (defined &$used) { my $old_sub = \&$used; *$used = sub { print "Calling $used\n"; &$old_sub; }; } }
In reply to Re (tilly) 2: Best way to fix a broken but functional program?
by tilly
in thread Best way to fix a broken but functional program?
by idnopheq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |