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.
When it dies it yeilds 'your data is screwed at B.pm line x'A.pm ----------- package A use B; B->foo(); B.pm ----------- package B sub foo{ die 'your data is screwed'; }
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?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: perl deferring die to calling method
by robin (Chaplain) on Dec 09, 2005 at 23:03 UTC | |
Re: perl deferring die to calling method
by Old_Gray_Bear (Bishop) on Dec 09, 2005 at 23:05 UTC | |
Re: perl deferring die to calling method
by ioannis (Abbot) on Dec 10, 2005 at 01:56 UTC | |
Re: perl deferring die to calling method
by bart (Canon) on Dec 10, 2005 at 22:38 UTC | |
Re: perl deferring die to calling method
by rfojta (Initiate) on Dec 10, 2005 at 11:42 UTC | |
by fmerges (Chaplain) on Dec 10, 2005 at 14:00 UTC | |
Re: perl deferring die to calling method
by chas (Priest) on Dec 10, 2005 at 20:47 UTC |
Back to
Seekers of Perl Wisdom