function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dclaardclaar 

Small bug in WWW::Salesforce::Simple

This is a really cool module! There's a tiny bug in version 0.10, however: The module doesn't check to see if $limit exists before trying the pattern match.

Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/site_perl/5.8.8/WWW/Salesforce/Simple.pm line 35.

 

Here's a patch:

diff -c WWW/Salesforce/Simple.pm.orig WWW/Salesforce/Simple.pm *** WWW/Salesforce/Simple.pm.orig 2009-09-09 13:31:58.000000000 -0700 --- WWW/Salesforce/Simple.pm 2009-09-09 13:30:06.000000000 -0700 *************** *** 33,39 **** } $limit = 2000 ! unless $limit =~ m/^\d+$/ and $limit > 0 and $limit < 2001; my @rows = (); #to be returned --- 33,39 ---- } $limit = 2000 ! unless defined $limit && $limit =~ m/^\d+$/ and $limit > 0 and $limit < 2001; my @rows = (); #to be returned

 

FrancoFranco
I tried this fix but, it didn't seem to work for me.  I still get the error.
dclaardclaar

Wow, I don't know. It is a really simple fix. Only things I can think of are:

  • Are you sure that the fix made it to the file you're actually using? (Are there multiple copies on your system, and maybe you're getting a different copy?)
  • Are you sure you actually wrote the file; that you didn't have permissions problems?
  • Did you maybe change your software respository copy instead of the live one?

 

I know, these are all really basic questions, but the only way I can see the fix not working is if it isn't there: There's really nothing else going on in that line that adding the "defined $limit &&" bit doesn't cover. If any of the above is the cause, don't fret...how do you think I came up with them? Not out of thin air! :smileywink: