http://qs1969.pair.com?node_id=515670

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.
A.pm ----------- package A use B; B->foo(); B.pm ----------- package B sub foo{ die 'your data is screwed'; }
When it dies it yeilds 'your data is screwed at B.pm line x'

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

What is the best way to accomplish this?