in reply to Re: AUTOLOAD inheritance
in thread AUTOLOAD inheritance

That describes a method call (whether class or instance), but not a non-method function call. For these, steps 2 and 3 are skipped. That steps 5 and 6 happen for non-method calls is a historical oddity, and is deprecated (hence the warning).

Update: the perldiag entry for the warning tells how to eliminate it if your code was intentionally relying on the deprecated behaviour: *AUTOLOAD = \&BaseClass::AUTOLOAD; (in this case, BaseClass would be DynaLoader.)   I would guess that more commonly, the warning is an indication of another problem, perhaps a missing use statement or misspelled function name.

Replies are listed 'Best First'.
Re: Re: Re: AUTOLOAD inheritance
by optimist (Beadle) on Feb 14, 2004 at 01:45 UTC
    Well, it might be helpful to tell the poster how to eliminate the warning.... Since the module in question is a Exporter and DynaLoader, and only the latter has an autoload method, adding the following to the module should work (untested in this form, slightly modified from working code in a different context):
    sub AUTOLOAD { my $name = our $AUTOLOAD; $name =~ s/.*:://; # lose package name my $target = "DynaLoader::$name"; goto &$target; }
    This will get called in Abigail-II's step 4, preventing the warning from step 5.