in reply to Method names with colons in them?

However, I still want to get AUTOLOAD called
It will. The question is, which AUTOLOAD? More precisely, AUTOLOAD in which package?

In the example you wrote, Perl will search for AUTOLOAD in the abc::xyz package and any other packages up the @ISA chain. In other words, it won't look for AUTOLOAD in the abc package (unless abc::xyz ISA abc).

More detail on AUTOLOAD is in perlsub.

Unless I've completely misunderstood your question....

Replies are listed 'Best First'.
Re^2: Method names with colons in them?
by runrig (Abbot) on Jul 08, 2005 at 16:29 UTC
    Actually, the error message is misleading (the 'def' package is called, not 'def::xyz'--update: the correct error message appears in perl 5.8.4, but not 5.6.1), and AUTOLOAD doesn't get called at all. The package called is 'def', and if you comment out the 'sub xyz...', you still get the error (maybe you could consider it a bug...I haven't read the docs lately, though):