Skip Menu |

This queue is for tickets about the RPC-XML CPAN distribution.

Report information
The Basics
Id: 35106
Status: resolved
Priority: 0/
Queue: RPC-XML

People
Owner: rjray [...] blackperl.com
Requestors: steveg [...] benon.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.65



Subject: Unexpected behaviour when creating nested arrays.
Date: Wed, 16 Apr 2008 17:00:07 +1000
To: bug-RPC-XML [...] rt.cpan.org
From: Steve Goodwin <steveg [...] benon.com>
The RPC::XML::array constructor behaves unexpectedly when the first argument is an RPC::XML::array object. To test ... $one = RPC::XML::array->new(1,2); $two = RPC::XML::array->new(3,4); $three = RPC::XML::array->new($one, $two); # same as $one. With the array constructor, the problem lies within the line ... my @args = (UNIVERSAL::isa($_[0], 'ARRAY')) ? @{$_[0]} : @_; When $three is being constructed, the isa subroutine evaluates to true, so the constructor dereferences the first argument ($one) to be arguments. A workaround for this is to pass the constructor arguments in an arrayref. Eg. $three = RPC::XML::array->new([$one, $two]); # creates nested arrays. Regards, Steve
Fixed, will be in 0.65 release. -- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Randy J. Ray Silicon Valley Scale Modelers: http://www.svsm.org rjray@blackperl.com randy.j.ray@gmail.com
-- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Randy J. Ray Silicon Valley Scale Modelers: http://www.svsm.org rjray@blackperl.com randy.j.ray@gmail.com