From c8f686b7aad65949cc8810d4260800e9efadf700 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 20 Apr 2019 11:28:48 +0100 Subject: [PATCH] #294 snmp::info should show full class used --- lib/SNMP/Info.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/SNMP/Info.pm b/lib/SNMP/Info.pm index 462dc878..59cc8d38 100644 --- a/lib/SNMP/Info.pm +++ b/lib/SNMP/Info.pm @@ -1388,7 +1388,15 @@ sub new { $new_obj->{snmp_comm} = $sess->{Community} || $args{Community} || 'public'; $new_obj->{snmp_user} = $sess->{SecName} || $args{SecName} || 'initial'; - return $auto_specific ? $new_obj->specify() : $new_obj; + my $info = $auto_specific ? $new_obj->specify() : $new_obj; + + if ( $info->debug() > 1 ) { + require mro; + print STDERR (ref $info) ." has resolution order: \n"; + print STDERR " $_\n" foreach @{ mro::get_linear_isa( ref $info ) }; + } + + return $info; } =item update() @@ -2208,6 +2216,7 @@ sub specify { $self->debug() and print "SNMP::Info::specify() - Changed Class to $device_type.\n"; + return $sub_obj; }