in reply to Re: How do I report an error back to the user of my object?
in thread How do I report an error back to the user of my object?
I'd write that as...
sub errorstr { # Both class, and Instance Method ref($_[0]) ? $_[0]{ERRORSTR} : $ERRORSTR; }
Yours will die if the user calls ClassName->errorstr.
|
---|