in reply to Re: RFC: User subroutine hinting interface for autodie
in thread RFC: User subroutine hinting interface for autodie

Devel::TraceMethods wraps too many calls, so trying to override with
use Devel::TraceCalls { Subs => [ qw! system ! ] };
fails with
Subroutine main::system not defined CHECK failed--call queue aborted.
Something to do with CHECK blocks. This use Devel::TraceCalls { Package => 'main'}; works, but its wraps too much. Managed to get it working with Sub::Prepend
BEGIN{ use Sub::Prepend 'prepend'; BEGIN { for my $name( qw[ system ] ){ prepend "$name" => sub{_logzy($name,@_)}; } } }
having this built into autodie would be so much easier for novices :)