Skip Menu |
 

This queue is for tickets about the eBay-API CPAN distribution.

Report information
The Basics
Id: 49736
Status: new
Priority: 0/
Queue: eBay-API

People
Owner: Nobody in particular
Requestors: abarone [...] venda.com
Cc:
AdminCc:

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



Subject: eBay-API-0.25 Bug
Date: Wed, 16 Sep 2009 13:53:17 +0100
To: bug-eBay-API [...] rt.cpan.org
From: Antonio Barone <abarone [...] venda.com>
Hi,
I believe I have found a bug in your module:

* Distribution name and version: eBay-API-0.25
* Perl version: v5.8.8
* Operating System vendor and version: Linux dev 2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 12:03:43 EST 2008 i686 i686 i386 GNU/Linux

Error Message:

Not an ARRAY reference at /export/www/code/HEAD/venda-tests/../venda-siteperl/eBay/API/XML/CallRetry.pm line 289.
 at /export/www/code/HEAD/venda-tests/../venda-siteperl/eBay/API/XML/CallRetry.pm line 289
    eBay::API::XML::CallRetry::shouldRetry('eBay::API::XML::CallRetry=HASH(0x105cfbe0)', 'raErrors', 'eBay::API::XML::DataType::ErrorType=HASH(0x104af824)') called at /export/www/code/HEAD/venda-tests/../venda-siteperl/eBay/API/XML/BaseCall.pm line 275
    eBay::API::XML::BaseCall::_submitHttpRequest('eBay::API::XML::Call::CompleteSale=HASH(0x104a81d8)', 'LWP::UserAgent=HASH(0x10638108)', 'HTTP::Request=HASH(0x104e9f4c)') called at /export/www/code/HEAD/venda-tests/../venda-siteperl/eBay/API/XML/BaseCall.pm line 169
    eBay::API::XML::BaseCall::execute('eBay::API::XML::Call::CompleteSale=HASH(0x104a81d8)') called at ..

Description:

eBay::API::XML::BaseCall::getErrorsAndWarnings(),

returns either a reference to an array or an array depending on the context it is called in.
At line 275 eBay/API/XML/BaseCall.pm, it is called in list context, therefore it returns an array
and not an arrayref as expected.
Please find attached a patch that seems to fix the issue.

Hope it helps

Antonio
Download eBay-API.patch
text/x-diff 592b
--- eBay-API-0.25/lib/eBay/API/XML/BaseCall.pm~ 2009-07-06 10:28:32.000000000 +0100 +++ eBay-API-0.25/lib/eBay/API/XML/BaseCall.pm 2009-09-16 10:27:43.000000000 +0100 @@ -272,10 +272,11 @@ $exitLoop = _TRUE_; } else { + my $errors = $self->getErrorsAndWarnings(); my $shouldRetry = $pCallRetry->shouldRetry( # ref to an array of ErrorDataType objects # check out both, errors and warnings - 'raErrors' => $self->getErrorsAndWarnings() + 'raErrors' => $errors, ); if ( $shouldRetry ) {


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.