arcnon has asked for the wisdom of the Perl Monks concerning the following question:

sorry I don't really know how to exactly phase my question. Hopefully the example can show what I can't phase right. ----------- package A use B; B->foo(); ----------- package B sub foo{ die 'your data is screwed'; }
When it dies it yeilds 'your data is screwed at line x'

what I would like is the die to report 'your data is screwed at line x'. x being the line number where B->foo was called.

What is the best way to accomplish this?