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.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'