in reply to Switch off warning for UNIVERSAL::AUTOLOAD
Or stop calling autoloaded class methods for classes where you've not installed an AUTOLOAD handler.BEGIN { $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /inherited AUTOLOAD/; }; }
In other words, if A "isa" B, don't create just B::AUTOLOAD: also install A::AUTOLOAD. That's all this is complaining about... it had to follow the @ISA for a class method or an ordinary subroutine (and that's guaranteed to break in the future... hence the deprecated part of the message).
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Switch off warning for UNIVERSAL::AUTOLOAD
by Yaakov (Novice) on Aug 08, 2000 at 22:05 UTC | |
|
RE: Re: Switch off warning for UNIVERSAL::AUTOLOAD
by Yaakov (Novice) on Aug 08, 2000 at 18:28 UTC |