http://qs321.pair.com?node_id=623666

haoess has asked for the wisdom of the Perl Monks concerning the following question:

perlsub says:

if an "AUTOLOAD" subroutine is defined in the package or packages used to locate the original subroutine, then that "AUTOLOAD" subroutine is called with the arguments that would have been passed to the original subroutine.
package Foo; sub AUTOLOAD { __PACKAGE__ } package main; sub AUTOLOAD { __PACKAGE__ } # should print Foo print $Foo::foo->(); # main print Foo::foo(); # Foo

Does $Foo::foo->() not mean locate the sub in the package Foo?

-- Frank