Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: perl deferring die to calling method

by ioannis (Abbot)
on Dec 10, 2005 at 01:56 UTC ( [id://515683] : note . print w/replies, xml ) Need Help??


in reply to perl deferring die to calling method

You could also use caller(). In the example bellow, I have renamed the package name from B.pm to Bb.pm -- so we don't load from the official B namespace.
package Bb; sub foo { die "your data is screwed at @{[ caller ]}" ; }