Skip Menu |

This queue is for tickets about the Cache-Memcached CPAN distribution.

Report information
The Basics
Id: 31067
Status: resolved
Priority: 0/
Queue: Cache-Memcached

People
Owner: Nobody in particular
Requestors: kost [...] ropnet.ru
Cc:
AdminCc:

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



CC: baranov [...] corp.mail.ru
Subject: Cache::Memcached::GetParser
Date: Thu, 29 Nov 2007 15:20:09 +0300
To: bug-Cache-Memcached [...] rt.cpan.org
From: Kost <kost [...] ropnet.ru>
Distribution name and version: Cache-Memcached-1.24 Perl version: 5.8.8 Operating System: FreeBSD 6.2 I've got a such error while testing Cache::Memcached: 'Use of uninitialized value in integer eq (==) at /usr/local/lib/perl5/site_perl/5.8.8/Cache/Memcached/GetParser.pm line 62' Steps: 1) Run memcached daemon on 127.0.0.1:11211 2) Start memcached_test.pl #!/usr/bin/perl -w use strict; use Cache::Memcached; # First of all we create a new class instance of Cache::Memcached: my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11211" ], 'debug' => 0 }; my $res = $memd->set("my_key", "Some value"); print $res ? 'insert ok' : 'insert error'; # go sleeping for a while.... # while sleeping we stop memcached and system brakes all connections with daemon (killall memcached) sleep(10); # After sleeping we try to read from dead socket... my $val = $memd->get("my_key"); 3) 'Use of uninitialized value in integer eq (==) at /usr/local/lib/perl5/site_perl/5.8.8/Cache/Memcached/GetParser.pm line 62' Simple solution: localhost# diff GetParser.pm GetParser_New.pm 62c62 < if ($res == 0) { --- Show quoted text
> if (!defined($res) || $res == 0) {
I have applied your fix to master in git and this will be released in the next version of C::M Hopefully this will be far sooner since the last release. Thanks much --hachi On Thu Nov 29 07:25:17 2007, kost@ropnet.ru wrote: Show quoted text
> Distribution name and version: Cache-Memcached-1.24 > Perl version: 5.8.8 > Operating System: FreeBSD 6.2 > > I've got a such error while testing Cache::Memcached: > 'Use of uninitialized value in integer eq (==) at > /usr/local/lib/perl5/site_perl/5.8.8/Cache/Memcached/GetParser.pm line > 62' > > Steps: > 1) Run memcached daemon on 127.0.0.1:11211 > > 2) Start memcached_test.pl > #!/usr/bin/perl -w > use strict; > use Cache::Memcached; > > # First of all we create a new class instance of > Cache::Memcached: > my $memd = new Cache::Memcached { 'servers' => [ > "127.0.0.1:11211" ], > 'debug' => 0 }; > my $res = $memd->set("my_key", "Some value"); > print $res ? 'insert ok' : 'insert error'; > > # go sleeping for a while.... > # while sleeping we stop memcached and system brakes all > connections > with daemon (killall memcached) > sleep(10); > > # After sleeping we try to read from dead socket... > my $val = $memd->get("my_key"); > > 3) 'Use of uninitialized value in integer eq (==) at > /usr/local/lib/perl5/site_perl/5.8.8/Cache/Memcached/GetParser.pm line > 62' > > > Simple solution: > localhost# diff GetParser.pm GetParser_New.pm > 62c62 > < if ($res == 0) { > ---
> > if (!defined($res) || $res == 0) {
resolved