Dynaloader uses AUTOLOAD. Since you have said that MyModule
is a Dynaloader, it means that if you call a function in the
MyModule class, and it can't be found, Perl is going to search
the Dynaloader package as well. Now, Perl also has the rule
that if a function isn't found in a package, Perl will search
for an AUTOLOAD function instead. These behaviours are not
mutally excluded. Basically what happens if you call a function
my_func in the package MyModule is:
- Search for the function my_func in MyModule.
If found, call it. Else:
- Search for the function my_func in any of the
packages inherited by MyModule. This is done in a depth-first order. If a function is found, call it.
Else:
- Search for the function my_func in the
UNIVERSAL package. If found, call it. Else:
- Search for the function AUTOLOAD in MyModule.
If found, call it. Else:
- Search for the function AUTOLOAD in any of the
packages inherited by MyModule. This is done in a depth-first order. If an AUTOLOAD function is found,
call it. Else:
- Search for the function AUTOLOAD in the
UNIVERSAL package. If found, call it. Else:
- Produce a fatal (but trappable) error about a function
not found.
It's case 5 that's trapping this warning.
Abigail