Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Like most object-oriented languages, Perl polymorphically selects the subroutine to invoke in response to a method call. The subroutine is the one belonging to the invoking object’s class. So, a call to $objref->method(@args) invokes CLASSNAME::method, where CLASSNAME is the class into which the $objref object was blessed.
If the class in question doesn’t have a suitable method, then the dispatch procedure searches “upwards” through the various superclasses of the object’s class, looking for an appropriate subroutine. If that search fails, the dispatch procedure searches the complete inheritance hierarchy again, looking for an AUTOLOAD subroutine instead.