From c0bc769be927dfdc8ae0b469329f146e02aa6ef4 Mon Sep 17 00:00:00 2001 From: Max Baker <> Date: Thu, 11 Jun 2009 18:06:15 +0000 Subject: [PATCH] add CVS revision number to debugging output to aid future email dumps --- Info.pm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Info.pm b/Info.pm index d4a9baa8..c0cd3520 100644 --- a/Info.pm +++ b/Info.pm @@ -1,8 +1,8 @@ -# SNMP::Info - Max Baker -# $Id$ +# SNMP::Info # -# Copyright (c) 2003-2008 Max Baker +# Copyright (c) 2003-2009 Max Baker # All rights reserved. +# # Portions Copyright (c) 2002-2003, Regents of the University of California # All rights reserved. # @@ -20,10 +20,11 @@ use Math::BigInt; @SNMP::Info::EXPORT_OK = qw//; use vars - qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG %SPEED_MAP + qw/$VERSION $VERSION_CVS %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG %SPEED_MAP $NOSUCH $BIGINT $REPEATERS/; $VERSION = '2.00'; +$VERSION_CVS = '$Id$'; =head1 NAME @@ -1179,10 +1180,6 @@ sub device_type { $desc =~ s/[\r\n\l]+/ /g; my $id = $info->id() || 'undef'; - $info->debug() - and print - "SNMP::Info::device_type() layers:$layers id:$id sysDescr:\"$desc\"\n"; - # Hash for generic fallback to a device class if unable to determine using # the sysDescr regex. my %l3sysoidmap = ( @@ -1226,6 +1223,11 @@ sub device_type { # Get just the enterprise number for generic mapping $id = $1 if ( defined($id) && $id =~ /^\.1\.3\.6\.1\.4\.1\.(\d+)/ ); + if ($info->debug()) { + print "SNMP::Info $VERSION ($VERSION_CVS)\n"; + print "SNMP::Info::device_type() layers:$layers id:$id sysDescr:\"$desc\"\n"; + } + # Layer 3 Supported # (usually has layer2 as well, so we check for 3 first) if ( $info->has_layer(3) ) {