Just another Perl shrine | |
PerlMonks |
Re^2: How do I report an error back to the user of my object?by polymorpheus (Novice) |
on Jun 05, 2012 at 13:15 UTC ( [id://974466]=note: print w/replies, xml ) | Need Help?? |
I would highly suggest you do not take an approach like this. Exception based errors (die/eval) are far superior in many respects. If you are not convinced yet, do some research (PBP, Modern Perl). Also look at all the monks! Most have already suggested die() and for good reasons! Also, in errorstr() I think I see a bug:I think you meant to do this? But more importantly, use exceptions instead!
In Section
Seekers of Perl Wisdom
|
|