Elizabeth Mattijsen via RT wrote:
>My point is that without knowing the object on which one attempts to
>call a method, one cannot know whether or not the method call will fail.

That's true, but the conclusion one would reach from that is that one
can't suggest calling the sub in method form even when it *is* available
as a method on Mu.  If you're going to run with that logic then that part
of the error message needs to be removed for all the subs that get it,
including ones like "say" as well as "bag".  Or if you really want to
refer to method calling, reword it something like ".$name if you meant
to call a method of that name on \$_".  What is being called is whatever
method exists of that name, not necessarily the sub with which the error
message is concerned.  My suggested wording is good for all the subs
that get these messages, whether or not available as methods on Mu.

But it's pretty normal style to rely on the methods on Mu being available
essentially unchanged in all subclasses.  There are other error messages
that recommend calling such methods.  (Try interpolating a type object
into a string, for example.)  So I think it's reasonable for these error
messages to suggest calling those methods that do actually exist in Mu.
If you're getting antsy about the overridability of Mu methods, there's
an awful lot of code and documentation that should change to stop relying
on those methods, not just a couple of messages.

-zefram

Reply via email to