Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 57889
Status: resolved
Priority: 0/
Queue: Net-Twitter-Lite

People
Owner: Nobody in particular
Requestors: vincent [...] vinc17.net
Cc:
AdminCc:

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



Subject: spurious warning when using ssl
I use: my $nt = Net::Twitter::Lite->new(ssl => 1, netrc => 1); and I get the following warning: Use of uninitialized value in substitution (s///) at /opt/local/lib/perl5/vendor_perl/5.8.9/Net/Twitter/Lite.pm line 53. The corresponding code in the module is: $new->{$_} =~ s/http/https/ for qw/apiurl searchurl search_trends_api_url lists_api_url/; Before doing the substitution, one should test whether $new->{$_} is defined.
From: vincent [...] vinc17.org
Patch attached.
Subject: patch-Lite.pm.diff
--- lib/Net/Twitter/Lite.pm~ 2010-05-26 17:28:56.000000000 +0200 +++ lib/Net/Twitter/Lite.pm 2010-05-27 03:58:51.000000000 +0200 @@ -49,7 +49,7 @@ eval { require Crypt::SSLeay } && $Crypt::SSLeay::VERSION >= 0.5 || croak "Crypt::SSLeay version 0.50 is required for SSL support"; - $new->{$_} =~ s/http/https/ + defined $new->{$_} && $new->{$_} =~ s/http/https/ for qw/apiurl searchurl search_trends_api_url lists_api_url/; }
Fixed in version 0.10002 (just uploaded to CPAN) The problem wasn't a failure to test for defined. I was testing an incorrect element. "searchurl" should have been "searchapiurl". I've added an appropriate test and fixed the bug. Thanks for the report! -Marc