From f9f3dc649020a808b2eaabe394af961ad981366b Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 20 Feb 2023 15:41:32 +0000 Subject: [PATCH] #464 check in case non numeric key in cache befor inc --- lib/SNMP/Info.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SNMP/Info.pm b/lib/SNMP/Info.pm index e1a34322..ae8945a6 100644 --- a/lib/SNMP/Info.pm +++ b/lib/SNMP/Info.pm @@ -4925,7 +4925,7 @@ sub _cache { my $store = $self->store(); if (ref {} eq ref $data) { - if (! Scalar::Util::looks_like_number($self->{"_${attr}"}) { + if (! Scalar::Util::looks_like_number($self->{"_${attr}"})) { # https://github.com/netdisco/snmp-info/issues/464 # perhaps this is being set twice and first time gets $data ?? $self->{"_${attr}"} = 0;