in reply to Re: Method names with colons in them?
in thread Method names with colons in them?

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):
#!/usr/bin/perl -w package ABC::XYZ; use strict; use warnings; use vars qw($AUTOLOAD); sub AUTOLOAD { print "package: ", __PACKAGE__, " $AUTOLOAD\n"; } package def; use strict; use warnings; use vars qw($AUTOLOAD); sub xyz { print "xyz\n"; } sub AUTOLOAD { print "package: ", __PACKAGE__, " $AUTOLOAD\n"; } package main; use strict; use warnings; my $m = "def::xyz"; ABC::XYZ->$m;
Updated: If you comment out the 'sub xyz...', AUTOLOAD gets called in package 'def'.