in reply to croak/confess from within File::Find

++ for bringing that here, so I read it :-)

I didn't know about @CARP_NOT, so I learned something new today.

Someone may have to add something after all.

Well, rather than staring for an hour I would have been pragmatic and used pragmas, and caller:

sub err { $Carp::CarpLevel = $carplevel; if ($which eq 'croak') { my @c = $carplevel ? caller($carplevel-1) : (undef,__FILE__,__ +LINE__); die "You did something bad! at $c[1] line $c[2]\n"; } else { confess "You did something bad!"; #line 14 } }

and croak/confess carplevels are consistent.

It seems that setting @CARP_NOT makes croak do a confess.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}