sub errmsg { local $Carp::CarpLevel = 1; Carp::croak "$_[0]"; }
update: i understand this is a rather contentious 'feature'! some suggest +=1 instead, or consider Carp::Clan..
again: +=1 doesn't work as i expected on a local, use local $Carp::CarpLevel = $Carp::CarpLevel + 1; as shenme suggested below!
In reply to Re: Carp croak not working when used in an imported function
by mreece
in thread Carp croak not working when used in an imported function
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |