Subject: | defined(%hash) deprecated in Perl 5.11 |
When run under Perl 5.11.2, many tests emit messages like the following:
defined(%hash) is deprecated at
/usr/local/perl/5.11.2/lib/site_per/5.11.2/SOAP/Lite.pm line 2204.
(Maybe you should just omit the defined()?)
I have marked this 'unimportant' because the tests pass and SOAP::Lite
works, and because Perl 5.11 is a development release. I believe the
warning signals an intent to do something similar in Perl 5.12, but
whether the warning actually makes it to 5.12 is another thing entirely.
The attached patch suppresses the deprecation warnings when applied
against lib/SOAP/Lite.pm version 0.710.10. The test is still a bit noisy
(mostly undef warnings) but that's a separate issue.
Of course, what's really needed is a module that tests whether a
namespace has been loaded. But I don't know of one.
Subject: | SOAP-Lite.patch |
--- lib/SOAP/Lite.old 2009-11-23 17:45:34.000000000 -0500
+++ lib/SOAP/Lite.pm 2009-11-23 17:45:45.000000000 -0500
@@ -462,7 +462,7 @@
(my $protocol_class = "${class}::$protocol") =~ s/-/_/g;
no strict 'refs';
- unless (defined %{"$protocol_class\::Client::"}
+ unless ( %{"$protocol_class\::Client::"}
&& UNIVERSAL::can("$protocol_class\::Client" => 'new')
) {
eval "require $protocol_class";
@@ -2201,7 +2201,7 @@
{
no strict qw(refs);
- if (! defined(%{"${schemaclass}::"}) ) {
+ if (! %{"${schemaclass}::"} ) {
eval "require $schemaclass" or die $@ if not ref $schemaclass;
}
}