On Thu, Jan 30, 2003 at 02:50:57PM -0000, fulkohew <fulkohew@...
> If I use warnings, then every class method invoked as a remote call
> generates a warning msg:
> Use of inherited AUTOLOAD for non-method Child::get_count() is
> deprecated at ./client line 45.
The problem is that autodispatch relies on AUTOLOAD. If a function or
method can't be found in your local code, SOAP::Lite's AUTOLOAD gets
invoked and sends it as a SOAP call. However, the use of AUTOLOAD for
vanilla subroutines (as opposed to methods) is deprecated as of Perl
Luckily, Perl 5.6 introduces different "classes" of warnings, so you can
selectively turn off deprecated warnings like this:
#Don't warn me about the use of AUTOLOAD for non-method subroutines,
#because SOAP::Lite's autodispatch depends on that "accidental feature"
no warnings "deprecated";
That's what I do in my code, which is running in Perl 5.6.1 on Solaris.
An unfortunate side effect is that you won't see warnings for any other
deprecated features, either. :(
I understand that Perl 5.8 actually does away with this behavior of AUTOLOAD
--that is, it invokes AUTOLOAD only when dispatching methods, not when
"dispatching" or resolving regular subroutines. Does anyone know how
SOAP::Lite works around this?
qw (Quinn Weaver); #President, San Francisco Perl Mongers
=for information, visit http://sf.pm.org/