in reply to Re^4: linting for undefined object methods
in thread linting for undefined object methods

This all makes sense to me, but given the constraint of statically defined methods, would it be reasonable to have the linter locate method names in known namespaces or else give warning?

So if any namespaces contains a sub, all classes are considered to define that sub? You could do that. It should help against typos.

  • Comment on Re^5: linting for undefined object methods

Replies are listed 'Best First'.
Re^6: linting for undefined object methods
by aespen (Initiate) on Sep 03, 2009 at 15:45 UTC
    The linter would warn if the method name could not be located in any namespace, ie.
    [Thu Sep 3 10:38:06 2009] ajaxGetDRCFilesTable.cgi: subroutine call $ +drc->searchDirectory() does not refer to any defined sub. line 223
    This would catch the deadly typo that gets missed during test. If I get a free moment, I'll take a look at some of the approaches proposed here to do something for our situation. Thanks for the help.
      Wouldn't testing coverage be simpler and find more problems.