[mplspm]: How to overload $!
Ken Williams
ken at mathforum.org
Thu Apr 29 16:21:47 CDT 2004
On Apr 29, 2004, at 2:48 PM, Mark Allen wrote:
> Awww, well. Fine.
>
> I made $Foo::error instead, in Foo.pm. :P
>
> Gets annoying having to remember all the namespaces which declare their
> own errors... but it sounds like there might be something better in
> Perl
> 6 (or 5.10 or whatever :-).
I tend to use $@ in this situation, which is similarly abusive, but
much easier to remember than some new package variable.
Also, it reminds you that you'd be better off using exception-style
code anyway. =)
-Ken
--------------------------------------------------
Minneapolis Perl Mongers mailing list
To unsubscribe, send mail to majordomo at pm.org
with "unsubscribe mpls" in the body of the message.
More information about the Mpls-pm
mailing list