Subject: | $me->use fails with new perl version because this calls UNIVERSAL::use instead of Pod::WSDL::AUTOLOAD |
Date: | Mon, 27 Feb 2012 11:27:43 +0000 |
To: | bug-Pod-WSDL [...] rt.cpan.org |
From: | marc.elser [...] umantis.com |
Hi to all the developers/maintainers of POD::WSDL,
I found an error in Pod-WSDL-0.05 (but is still existent in 0.061 as far
as I can tell). The problem is that the properties of the Pod::WSDL object
are called via the AUTOLOAD functionality which calls Pod::WSDL::AUTOLOAD.
One of the properties is named {_use} and is called by $me->use. Our perl
version (perl -v shows "This is perl, v5.8.8 built for
x86_64-linux-thread-multi") doesn't like this because $me->use calls the
"use" Method of UNIVERSAL because UNIVERSAL is the parent class of all
other classes (and therefore also of a of Pod::WSDL instance). So $me->use
calls the inherited method named "use" which it gets from UNIVERSAL
(instead of the AUTOLOAD) which results in the following error:
UNIVERSAL::require() can only be run as a class method,
caller:UNIVERSAL::use at
/usr/lib/perl5/vendor_perl/5.8.8/UNIVERSAL/require.pm line 83.
this happens because $me->use calls UNIVERSAL::use which calls
UNIVERSAL::require and $me is passed as the class/object and because $me
is a reference it dies there.
I tried replacing all $me->use by $me->{_use} and this solves the problem
but you should fix this as Pod::WSDL seems to have stopped working in
newer perl releases (maybe some security fix which introduced an updated
UNIVERSAL.pm). I think you should avoid method names of "UNIVERSAL" when
autoloading even better would be the use of some prefix or something to
avoid future collisions with UNIVERSAL.
And here some addition infos: we're running an CentOS 5.5 (uname -a shows
"Linux da6 2.6.18-274.17.1.el5 #1 SMP Tue Jan 10 17:25:58 EST 2012 x86_64
x86_64 x86_64 GNU/Linux") but I don't think this is relevant for this bug.
Best regards,
Marc Elser
Show quoted text
__________________________________________________
Marc Elser | Software Engineering Architect
umantis AG | Teufener Strasse 11 | CH-9001 St.Gallen
T +41 71 224 01 01 | F +41 71 224 01 02
T direct +41 71 224 01 38
marc.elser@umantis.com | www.umantis.com
__________________________________________________
News rund um umantis finden Sie laufend unter:
- www.umantis.com/news