Skip Menu |

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

Report information
The Basics
Id: 31066
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>
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) {
-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
duplicate