From 4005640a2bfba11aa435fe32bd30275304b19e97 Mon Sep 17 00:00:00 2001 From: Carlos Vicente Date: Fri, 7 Dec 2012 09:20:48 -0500 Subject: [PATCH] Check if \$stp_ver is defined (Wim Vandersmissen) --- Info/CiscoStpExtensions.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Info/CiscoStpExtensions.pm b/Info/CiscoStpExtensions.pm index c267253b..0a92f342 100644 --- a/Info/CiscoStpExtensions.pm +++ b/Info/CiscoStpExtensions.pm @@ -35,7 +35,9 @@ use SNMP::Info; use SNMP::Info::Bridge; use vars qw/$VERSION $DEBUG %MIBS %FUNCS %GLOBALS %MUNGE %PORTSTAT $INIT/; -$VERSION = '2.09'; + +$VERSION = '3.00_001'; + @SNMP::Info::CiscoStpExtensions::ISA = qw/SNMP::Info::Bridge SNMP::Info Exporter/; @SNMP::Info::CiscoStpExtensions::EXPORT_OK = qw//; @@ -75,7 +77,7 @@ $VERSION = '2.09'; sub stp_ver { my $self = shift; my $stp_ver = $self->SUPER::stp_ver(); - if ( $stp_ver eq 'unknown' ){ + if ( !defined($stp_ver) || $stp_ver eq 'unknown' ){ if ( defined $self->stpx_stp_type() ){ $stp_ver = $self->stpx_stp_type(); }