http://www.perlmonks.org?node_id=554438


in reply to Re^2: Carp::Clan
in thread Carp::Clan

you just push there the names of the packages you want to skip when calling carp, croak, etc.

For instance:

#!/usr/bin/perl package Foo; sub foo { Bar::bar() } package Bar; use Carp; our @CARP_NOT = qw(Foo); sub bar { croak "hello" } package main; Foo::foo();
prints...
hello at /tmp/t.pl line 12