Subject: | uninitialized value $res in numeric gt (>) at Cache/Memcached.pm line 774 |
Date: | Fri, 6 Jul 2018 13:11:33 -0400 |
To: | bug-Cache-Memcached [...] rt.cpan.org |
From: | Rocco Caputo <rcaputo [...] cpan.org> |
The code in question:
return 0
if not defined $res and $!==EWOULDBLOCK;
unless ($res > 0) {
$dead->($sock);
return 1;
}
The uninitialized value warning can fire when $res is undef but $! isn't EWOULDBLOCK.
One work-around would be:
unless (($res // 0) > 0) {
...
}