in reply to detecting improperly called subroutines

You can't detect it at compile-time, because Perl doesn't know at that point what the object's class might be and therefore can't determine whether the method call is appropriate or not.

If you try to call the misspelled method at runtime, you'll get a "can't locate object method..." error. You can trap those errors if you wish by defining an AUTOLOAD subroutine in your class; AUTOLOAD gets called when no other method in the class (or its ancestors) matches.

  • Comment on Re: detecting improperly called subroutines