more useful options | |
PerlMonks |
Re: Error.pm and custom Exceptionby fmerges (Chaplain) |
on Feb 24, 2009 at 11:57 UTC ( [id://745973]=note: print w/replies, xml ) | Need Help?? |
Hi, As said already, you don't get $self in the constructor... it's $class, so you should have:
Beside of this, I would strongly recommend you to not use Error.pm, based on my own experience. Some reasons:
* If you forget the ; at the end of your try...catch block you will have hard time trying to find obscure bugs, what you see in the code is not what is being executed. For these reasons I would rather recommend you to use Exception::Class instead. Regards,
fmerges at irc.freenode.net
In Section
Seekers of Perl Wisdom
|
|