Subject: | uninitialized value warnings |
Date: | Wed, 3 Aug 2011 15:22:54 -0400 |
To: | <bug-Memcached-libmemcached [...] rt.cpan.org> |
From: | "Stephen J. Smith" <stsmith [...] manta.com> |
Hi. We recently migrated to Cache::Memcached::libmemcached. It is
working well, but we are seeing many errors like the following in our logs:
Use of uninitialized value in subroutine entry at (eval 98) line 15.
It looks like this issue may have been reported before on the mailing
list:
http://lists.libmemcached.org/pipermail/libmemcached-discuss/2008-April/001322.html
The thread contains a suggested patch:
--- typemap (revision 143)
+++ typemap (working copy)
@@ -134,7 +134,7 @@
T_EXPIRATION
/* T_EXPIRATION */
/* XXX add logic for default expiration */
- $var = ($type)SvUV($arg)
+ $var = (SvOK($arg)) ? ($type)SvUV($arg) : 0;
OUTPUT
T_MEMCACHED
We will test the suggested patch and let you know if it works for us.
Thanks,
Stephen