Skip Menu |
 

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

Report information
The Basics
Id: 62667
Status: rejected
Priority: 0/
Queue: SOAP-Lite

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

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



Subject: User reported crash; patch supplied
Download (untitled) / with headers
text/plain 232b
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=602056 "Using the (slightly modified) examples at: http://guide.soaplite.com/ causes the client to die with: Not a HASH reference at /usr/share/perl5/SOAP/Lite.pm line 3755."
Subject: hashref_crash.patch
Download hashref_crash.patch
text/x-diff 1007b
Author: Ashish Shukla <wahjava@members.fsf.org> Subject: use 'ref' rather than 'UNIVERSAL::isa' --- a/lib/SOAP/Lite.pm +++ b/lib/SOAP/Lite.pm @@ -3747,13 +3747,13 @@ # fillup parameters UNIVERSAL::isa($_[$param] => 'SOAP::Data') ? $_[$param]->SOAP::Data::value($value) - : UNIVERSAL::isa($_[$param] => 'ARRAY') + : (ref($_[$param] eq 'ARRAY')) ? (@{$_[$param]} = @$value) - : UNIVERSAL::isa($_[$param] => 'HASH') + : (ref($_[$param]) eq 'HASH') ? (%{$_[$param]} = %$value) - : UNIVERSAL::isa($_[$param] => 'SCALAR') + : (ref($_[$param]) eq 'SCALAR') ? (${$_[$param]} = $$value) - : ($_[$param] = $value) + : ($_[$param] = $value); } } }
Subject: Re: [rt.cpan.org #62667] User reported crash; patch supplied
Date: Wed, 17 Nov 2010 08:24:18 +0100
To: bug-SOAP-Lite [...] rt.cpan.org
From: Martin Kutter <martin.kutter [...] fen-net.de>
Download (untitled) / with headers
text/plain 2.2k
Hi, the example this bug report tries to run is broken: It only works for hash-based objects (and then it only works when there's no additional constructor logic to perform). This can be easily validated by using a inside-out object for Template. The patch makes SOAP::Lite accept objects as Hash references, which is fundamentally wrong for everything but hash-based objects without a trivial constructor. Actually, the example should never have been published. Best regards, Martin Am Mittwoch, den 03.11.2010, 08:01 -0400 schrieb Nicholas Bamber via RT: Show quoted text
> Wed Nov 03 08:01:29 2010: Request 62667 was acted upon. > Transaction: Ticket created by SILASMONK > Queue: SOAP-Lite > Subject: User reported crash; patch supplied > Broken in: 0.712 > Severity: Critical > Owner: Nobody > Requestors: SILASMONK@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=62667 > > > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=602056 > > "Using the (slightly modified) examples at: > > http://guide.soaplite.com/ > > causes the client to die with: > > Not a HASH reference at /usr/share/perl5/SOAP/Lite.pm line 3755." > > Unterschiede zwischen Dateien-Anlage (hashref_crash.patch) > Author: Ashish Shukla <wahjava@members.fsf.org> > Subject: use 'ref' rather than 'UNIVERSAL::isa' > > --- a/lib/SOAP/Lite.pm > +++ b/lib/SOAP/Lite.pm > @@ -3747,13 +3747,13 @@ > # fillup parameters > UNIVERSAL::isa($_[$param] => 'SOAP::Data') > ? $_[$param]->SOAP::Data::value($value) > - : UNIVERSAL::isa($_[$param] => 'ARRAY') > + : (ref($_[$param] eq 'ARRAY')) > ? (@{$_[$param]} = @$value) > - : UNIVERSAL::isa($_[$param] => 'HASH') > + : (ref($_[$param]) eq 'HASH') > ? (%{$_[$param]} = %$value) > - : UNIVERSAL::isa($_[$param] => 'SCALAR') > + : (ref($_[$param]) eq 'SCALAR') > ? (${$_[$param]} = $$value) > - : ($_[$param] = $value) > + : ($_[$param] = $value); > } > } > }
Download (untitled) / with headers
text/plain 365b
On Wed 17 Nov 2010 02:24:32, martin.kutter@fen-net.de wrote: Show quoted text
> the example this bug report tries to run is broken: It only works for > hash-based objects (and then it only works when there's no additional > constructor logic to perform).
*SNIP* Show quoted text
> Actually, the example should never have been published.
*SNIP I think this means the bug report should be rejected.
Download (untitled) / with headers
text/plain 190b
On Fri 22 Jul 2011 06:21:35, MICHIELB wrote: Show quoted text
> I think this means the bug report should be rejected.
OTOH apparently the Debian package maintainer included a patch for this one downstream!
Download (untitled) / with headers
text/plain 136b
As stated before, the example is erroneous. The patch would break things for code using Moose (just an example). Best Regards, Martin
Subject: Re: [rt.cpan.org #62667] User reported crash; patch supplied
Date: Fri, 17 May 2013 13:21:37 +0200
To: bug-SOAP-Lite [...] rt.cpan.org
From: Xavier <x.guimard [...] free.fr>
Download (untitled) / with headers
text/plain 309b
Hi, as said here: http://bugs.debian.org/602056, UNIVERSAL doc mentions: # but never do this! $is_io = UNIVERSAL::isa($fd, "IO::Handle"); $sub = UNIVERSAL::can($obj, "print"); So maybe we could replace UNIVERSAL::isa($_[$param] => 'ARRAY') by $_[$param]->isa('ARRAY') Cheers, Xavier
Subject: Re: [rt.cpan.org #62667] User reported crash; patch supplied
Date: Sat, 18 May 2013 20:31:48 +0200
To: bug-SOAP-Lite [...] rt.cpan.org
From: Xavier <x.guimard [...] free.fr>
Download (untitled) / with headers
text/plain 386b
Hi, looking one more time to the reported problem, it seems that in the broken example $values is a ref to a hashref. I've so written the joined patch. Note the new case: elsif ( reftype( $_[$param] ) eq 'HASH' ) { ... elsif ( reftype($value) eq 'REF' ) { %{ $_[$param] } = %$$value; } } This patch is entirely empirical, but it does run the proposed example.

Message body is not shown because sender requested not to inline it.



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.