in reply to Re: Best way to fix a broken but functional program?
in thread Best way to fix a broken but functional program?

If you want to write such a logging function, there is no need to add it manually everywhere. Try just dropping the following at the start of the script:
foreach my $used (keys %main::) { no strict; if (defined &$used) { my $old_sub = \&$used; *$used = sub { print "Calling $used\n"; &$old_sub; }; } }
This one only abuses subroutines in your main package. Alter as desired. :-)