From d62709a9ea36084519ab9b61477f433a402efd7e Mon Sep 17 00:00:00 2001 From: Paul Cochrane Date: Thu, 21 May 2015 10:50:55 +0200 Subject: [PATCH] Turn _incrdecr into a method The `$!active` and `$!readonly` variables are object attributes and thus need `self` to be available so that they can be read. Hence the sub should be a method. --- lib/Cache/Memcached.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cache/Memcached.pm b/lib/Cache/Memcached.pm index b0dc27a..eadf15c 100644 --- a/lib/Cache/Memcached.pm +++ b/lib/Cache/Memcached.pm @@ -959,7 +959,7 @@ method decr ($key, $offset) { $._incrdecr("incr", $key, $offset); } -sub _incrdecr ($cmdname, $key, $value) { +method _incrdecr ($cmdname, $key, $value) { return if ! $!active || $!readonly; my $stime;