Skip Menu |
 

This queue is for tickets about the SOAP-Lite CPAN distribution.

Report information
The Basics
Id: 52015
Status: resolved
Priority: 0/
Queue: SOAP-Lite

People
Owner: Nobody in particular
Requestors: IKEGAMI [...] cpan.org
wyant [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.710.10
Fixed in: (no value)



Subject: defined(%hash) deprecated in Perl 5.11
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1259016860-6514-1196"
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 812
Download (untitled) / with headers
text/plain 812b
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
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1259016522-6514-1195"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: application/octet-stream; name="SOAP-Lite.patch"
Content-Disposition: inline; filename="SOAP-Lite.patch"
Content-Transfer-Encoding: base64
Content-Length: 680
Download SOAP-Lite.patch
text/x-diff 680b
--- 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; } }
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-26544-1269563942-335.52015-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1333
Download (untitled) / with headers
text/plain 1.3k
On Mon Nov 23 17:54:24 2009, WYANT wrote: Show quoted text
> 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.
Hello, I am the author of POE::Component::Server::SOAP and this bit me today. A CPANTesters report showed that 5.12.0-RC0 still had this warning enabled. It would be nice if this could be patched so we have a warning-free load :) Again, great work on such an excellent SOAP library! http://www.cpantesters.org/cpan/report/6998891 # My module's report http://www.cpantesters.org/cpan/report/7001861 # SOAP::Lite's report -- ~Apocalypse
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-26544-1269563942-335.52015-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-26544-1269563942-335.52015-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-26547-1269572961-1203.52015-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 351
Download (untitled) / with headers
text/plain 351b
PS - I thought I had seen a module that tested if a namespace had been loaded, and I had: Adam Kennedy's Class::Inspector has a loaded() method that does this. If that's really what the checks of %Foo::Bar:: are about, and you don't want to roll your own, this might do the job. It appears to be very lightweight as far as dependencies go. Tom Wyant
MIME-Version: 1.0
Subject: defined(%hash) deprecated in Perl 5.12
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Message-ID: <rt-3.8.HEAD-6772-1272545914-982.52015-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: binary
From: Mike B.
X-RT-Original-Encoding: utf-8
Content-Length: 1107
On Mon Nov 23 17:54:24 2009, WYANT wrote: Show quoted text
> 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.
Well, of course 5.12 is out, and the behavior of warning is here to stay. I have a script to check what versions of modules are installed, and it does this: defined(%hash) is deprecated at C:/strawberry/perl/vendor/lib/SOAP/Lite.pm line 465. (Maybe you should just omit the defined()?) defined(%hash) is deprecated at C:/strawberry/perl/vendor/lib/SOAP/Lite.pm line 2203. (Maybe you should just omit the defined()?) o SOAP::Lite.....................ok (v0.711) So I guess it would be nice if this can be addressed in an upcoming version of SOAP::Lite.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-26547-1269572961-1203.52015-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-26544-1269563942-335.52015-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-26547-1269572961-1203.52015-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6776-1273092926-222.52015-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 715
Download (untitled) / with headers
text/plain 715b
On Thu Mar 25 23:09:21 2010, WYANT wrote: Show quoted text
> PS - > > I thought I had seen a module that tested if a namespace had been > loaded, and I had: Adam Kennedy's Class::Inspector has a loaded() method > that does this. If that's really what the checks of %Foo::Bar:: are > about, and you don't want to roll your own, this might do the job. It > appears to be very lightweight as far as dependencies go. > > Tom Wyant
The fix is much simpler $ perl -wle' sub Foo::foo; print defined(%{"$_\::"}) ?1:0 for qw( Foo Bar ); ' defined(%hash) is deprecated at -e line 3. (Maybe you should just omit the defined()?) 1 0 $ perl -wle' sub Foo::foo; print %{"$_\::"} ?1:0 for qw( Foo Bar ); ' 1 0
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6776-1273092926-222.52015-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
References: <rt-3.8.HEAD-26544-1269563942-335.52015-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-26547-1269572961-1203.52015-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6776-1273092926-222.52015-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1273093473-6774-93"
Message-ID: <rt-3.8.HEAD-6774-1273093473-442.52015-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 38
Patch against version 0.711 attached.
MIME-Version: 1.0
Subject: defined_hash_warn.patch
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/x-patch; name="defined_hash_warn.patch"
Content-Disposition: inline; filename="defined_hash_warn.patch"
Content-Transfer-Encoding: binary
Content-Length: 664
--- Lite.pm 2010-05-05 16:58:51.000000000 -0400 +++ Lite.new.pm 2010-05-05 17:02:54.000000000 -0400 @@ -461,7 +461,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"; @@ -2200,7 +2200,7 @@ { no strict qw(refs); - if (! defined(%{"${schemaclass}::"}) ) { + if (! %{"${schemaclass}::"} ) { eval "require $schemaclass" or die $@ if not ref $schemaclass; } }
From martin.kutter [...] fen-net.de Fri May 7 11: 36:11 2010
MIME-Version: 1.0
X-Spam-Status: No, score=-10.599 tagged_above=-99.9 required=10 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-6776-1273092927-810.52015-5-0 [...] rt.cpan.org>
X-Mailer: Evolution 2.28.3
X-Spam-Flag: NO
References: <RT-Ticket-52015 [...] rt.cpan.org> <rt-3.8.HEAD-26544-1269563942-335.52015-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-26547-1269572961-1203.52015-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-6776-1273092927-810.52015-5-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Content-Type: text/plain; charset="utf-8"
Message-ID: <1273246576.1644.2.camel [...] cyclops>
X-RT-Original-Encoding: utf-8
X-Spam-Score: -10.599
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 80853240725 for <cpan-bug+SOAP-Lite [...] hipster.bestpractical.com>; Fri, 7 May 2010 11:36:11 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6QiNjtkFQPVW for <cpan-bug+SOAP-Lite [...] hipster.bestpractical.com>; Fri, 7 May 2010 11:36:09 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 36CB42406A5 for <bug-SOAP-Lite [...] rt.cpan.org>; Fri, 7 May 2010 11:36:08 -0400 (EDT)
Received: (qmail 4880 invoked by uid 103); 7 May 2010 15:36:27 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 7 May 2010 15:36:27 -0000
Received: from hermes.f3n.de (HELO hermes.f3n.de) (212.204.115.44) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Fri, 07 May 2010 08:36:22 -0700
Received: from [192.168.178.21] (ppp-88-217-108-78.dynamic.mnet-online.de [88.217.108.78]) (authenticated bits=0) by hermes.f3n.de (8.13.8/8.13.8) with ESMTP id o47FaHgE009238 for <bug-SOAP-Lite [...] rt.cpan.org>; Fri, 7 May 2010 17:36:17 +0200
Delivered-To: cpan-bug+SOAP-Lite [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #52015] defined(%hash) deprecated in Perl 5.11
Return-Path: <martin.kutter [...] fen-net.de>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+SOAP-Lite [...] hipster.bestpractical.com
X-RT-Mail-Extension: soap-lite
Date: Fri, 07 May 2010 17:36:16 +0200
X-Spam-Level:
To: bug-SOAP-Lite [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Martin Kutter <martin.kutter [...] fen-net.de>
RT-Message-ID: <rt-3.8.HEAD-6782-1273246591-1406.52015-0-0 [...] rt.cpan.org>
Content-Length: 71
Hi, this is already fixed in SVN - I used Class::Inspector. Martin
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2954-1313699488-637.52015-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 17
fixed in >= 0.713


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.