It's regular_code
that's considered "safe" by this_may_fail
. The check is based on namespace, so to make it unsafe, you'd place this_may_fail
in a different namespace.
Or write your own croaker.
perl -e'
use Carp qw( );
sub untrusting_croak {
goto &Carp::croak if $Carp::Verbose;
my @caller = caller(1);
die(join("", @_)." at $caller[1] line $caller[2]\n");
}
sub f { untrusting_croak("!!!"); } # Line 9
f(); # Line 11
'
!!! at -e line 11