in reply to Re^3: Should I use carp/croak or warn/die (@CARP_NOT)
in thread Should I use carp/croak or warn/die

I wouldn't ask if I knew.

> evaluated at compile-time.

nope that's obvious from the docs and from a simple test.

> you're simply blah-blahing here.

Look who's talking...

Anyway carp() seems to already do by default what I wanted. \o/

It doesn't report from the caller function but the caller package.

use strict; use warnings; use Data::Dump qw/pp dd/; TEST::first(); # <- line 6 #push @main::CARP_NOT, qw(TEST); # uncomment to see dynamic behaviour #TEST::first(); package TEST; use Carp; sub first { second(); } sub second { carp "some warning"; }

some warning at d:/Users/RolfLangsdorf/pm/ line 6.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery