Next Tricks of the Wizards 101

Brief Digression: Tracing Again

            my $real_func = \&*$func_name;
            *{$caller . "::$func_name"} = sub {
              print "$func_name(@_)\n";
              $real_func->(@_);
            };
            {$caller . "::$func_name"} = sub {
              print "$func_name(@_)\n";
              goto &$real_func;
            };


Next Copyright © 2003 M. J. Dominus