Skip Menu |

This queue is for tickets about the WWW-Salesforce CPAN distribution.

Report information
The Basics
Id: 48276
Status: resolved
Priority: 0/
Queue: WWW-Salesforce

People
Owner: cwhitener [...] gmail.com
Requestors: MARKSTOS [...] cpan.org
Cc:
AdminCc:

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



Subject: fault() is called on $res without checking to see if $res is defined.
This output illustrates the bug: #### Use of uninitialized value in pattern match (m//) at my_www_salesforce/lib/perl5/WWW/Salesforce/Simple.pm line 35. MALFORMED_QUERY: Select * from Users ^ ERROR at Row:1:Column:7 unexpected token: '*' at www_salesforce.pl line 25 Can't call method "fault" without a package or object reference at my_www_salesforce/lib/perl5/WWW/Salesforce/Simple.pm line 42. #### The related code looks like this: my $res = $self->query( query => $query, limit => $limit ); if ( $res->fault() ) { #### It looks like it's important to check that "$res" is actually defined before calling "fault()" on it. Mark
Hi Mark, All error handling code is being rewritten in the new version of the module. I'll keep you updated on the progress with that. Thanks, Chase On Tue Jul 28 14:20:54 2009, MARKSTOS wrote: Show quoted text
> This output illustrates the bug: > > #### > Use of uninitialized value in pattern match (m//) at > my_www_salesforce/lib/perl5/WWW/Salesforce/Simple.pm line 35. > MALFORMED_QUERY: > Select * from Users > ^ > ERROR at Row:1:Column:7 > unexpected token: '*' at www_salesforce.pl line 25 > Can't call method "fault" without a package or object reference at > my_www_salesforce/lib/perl5/WWW/Salesforce/Simple.pm line 42. > > #### > > The related code looks like this: > > my $res = $self->query( query => $query, limit => $limit ); > if ( $res->fault() ) { > > #### > > It looks like it's important to check that "$res" is actually defined > before calling "fault()" on it. > > Mark
Resolved with 0.12, we check for existence of $r or $res and die appropriately if not defined.