I think the two primary pieces of information I would want in a "method should be overloaded" error message are the name of the method and the name of the class that didn't implement it. So I really think you need to report the latter (my $class= ref $self || $self;).
I'm not sure why you are writing code to look up the string "abstract_method" (perhaps so you can re-use this subroutine similar to *replace_me= \&abstrace_method;? -- no, doing so would still report "abstract_method" according to my testing, unfortunately). And, at least in this case, you don't even need to include the method name in the text since Carp::confess will already show that in the stack trace (though the error message is clearer if you do, of course). :)
- tye
In reply to Re^3: Inheritance and calling a subclass method *from* a baseclass method... (error data)
by tye
in thread Inheritance and calling a subclass method *from* a baseclass method...
by EvanK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |