From 23d11551c61e8f2789e9bfcdfcb2810c831c8c90 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 28 Apr 2019 19:54:51 +0100 Subject: [PATCH] #332 fix undef error when debug on $info --- 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 c8c2ba3c..59380e67 100644 --- a/lib/SNMP/Info.pm +++ b/lib/SNMP/Info.pm @@ -1390,7 +1390,7 @@ sub new { my $info = $auto_specific ? $new_obj->specify() : $new_obj; - if ( $info->debug() > 1 ) { + if (defined $info and ($info->debug() > 1)) { require mro; print STDERR (ref $info) ." has resolution order: \n"; print STDERR " $_\n" foreach @{ mro::get_linear_isa( ref $info ) };