diff --git a/Info/Bridge.pm b/Info/Bridge.pm index d56b3ccf..5d3df67a 100644 --- a/Info/Bridge.pm +++ b/Info/Bridge.pm @@ -139,7 +139,7 @@ sub qb_fw_mac { my($fdb_id, $mac) = _qb_fdbtable_index($idx); $qb_fw_mac->{$idx} = $mac; } - $qb_fw_mac; + return $qb_fw_mac; } sub qb_i_vlan_t { diff --git a/Info/Layer1.pm b/Info/Layer1.pm index 16b211f1..9d9b3ca2 100644 --- a/Info/Layer1.pm +++ b/Info/Layer1.pm @@ -110,6 +110,8 @@ sub vendor { return 'cisco' if ($descr =~ /(catalyst|cisco|ios)/i); return 'allied' if ($descr =~ /allied/i); return 'asante' if ($descr =~ /asante/i); + + return 'unknown'; } diff --git a/Info/Layer2/Aironet.pm b/Info/Layer2/Aironet.pm index 94016636..6e6142da 100644 --- a/Info/Layer2/Aironet.pm +++ b/Info/Layer2/Aironet.pm @@ -267,7 +267,8 @@ sub munge_cd11_txrate { my $txrates = shift; my @rates = unpack("C*", $txrates); map {$_ *= 0.5} @rates; - \@rates; + + return \@rates; } # cd11 INDEX diff --git a/Info/Layer2/C1900.pm b/Info/Layer2/C1900.pm index 4c50f01e..e8edd660 100644 --- a/Info/Layer2/C1900.pm +++ b/Info/Layer2/C1900.pm @@ -88,8 +88,8 @@ $VERSION = '1.09'; %SNMP::Info::CDP::MUNGE, ); -sub bulkwalk_no { 1; } -sub cisco_comm_indexing { 1; } +sub bulkwalk_no { return 1; } +sub cisco_comm_indexing { return 1; } sub vendor { return 'cisco'; diff --git a/Info/Layer2/C2900.pm b/Info/Layer2/C2900.pm index 1c655b25..58daaf00 100644 --- a/Info/Layer2/C2900.pm +++ b/Info/Layer2/C2900.pm @@ -93,7 +93,7 @@ sub vendor { } sub cisco_comm_indexing { - 1; + return 1; } sub i_duplex { diff --git a/Info/Layer2/Catalyst.pm b/Info/Layer2/Catalyst.pm index 7aa667f0..cb712637 100644 --- a/Info/Layer2/Catalyst.pm +++ b/Info/Layer2/Catalyst.pm @@ -141,7 +141,7 @@ sub bp_index { } sub cisco_comm_indexing { - 1; + return 1; } sub interfaces { diff --git a/Info/Layer2/Foundry.pm b/Info/Layer2/Foundry.pm index 00e92d40..044b88aa 100644 --- a/Info/Layer2/Foundry.pm +++ b/Info/Layer2/Foundry.pm @@ -204,7 +204,7 @@ sub vendor { # this hangs on a edgeiron24g # TODO: check by devicetype and deferr to SUPER if not bad device -sub stp_p_state { undef; } +sub stp_p_state { return undef; } 1; __END__ diff --git a/Info/Layer3.pm b/Info/Layer3.pm index 9ba29e80..11f49148 100644 --- a/Info/Layer3.pm +++ b/Info/Layer3.pm @@ -273,6 +273,8 @@ sub vendor { return 'cisco' if ($descr =~ /(cisco|\bios\b)/i); return 'foundry' if ($descr =~ /foundry/i); + + return 'unknown'; } diff --git a/Info/Layer3/C3550.pm b/Info/Layer3/C3550.pm index 01dffd7b..5866d91c 100644 --- a/Info/Layer3/C3550.pm +++ b/Info/Layer3/C3550.pm @@ -211,12 +211,12 @@ sub set_i_duplex_admin { return $c3550->set_p_duplex($duplexes{$duplex}, $iid); } else { - $c3550->SUPER::set_i_duplex_admin; + return $c3550->SUPER::set_i_duplex_admin; } } sub cisco_comm_indexing { - 1; + return 1; } 1; diff --git a/Info/Layer3/C4000.pm b/Info/Layer3/C4000.pm index b11b1eb1..9365afaf 100644 --- a/Info/Layer3/C4000.pm +++ b/Info/Layer3/C4000.pm @@ -119,10 +119,10 @@ sub fan { $s = ", "; } return if ($s eq ""); - $ret; + return $ret; } -sub cisco_comm_indexing { 1; } +sub cisco_comm_indexing { return 1; } 1; __END__ diff --git a/Info/Layer3/C6500.pm b/Info/Layer3/C6500.pm index 13bafdf0..9552324e 100644 --- a/Info/Layer3/C6500.pm +++ b/Info/Layer3/C6500.pm @@ -108,7 +108,7 @@ sub vendor { return 'cisco'; } -sub cisco_comm_indexing { 1; } +sub cisco_comm_indexing { return 1; } # Newer versions use the ETHERLIKE-MIB to report operational duplex. @@ -188,7 +188,7 @@ sub set_i_duplex_admin { return $c6500->set_p_duplex($duplexes{$duplex}, $iid); } else { - $c6500->SUPER::set_i_duplex_admin; + return $c6500->SUPER::set_i_duplex_admin; } } diff --git a/Info/Layer3/Cisco.pm b/Info/Layer3/Cisco.pm index 5f9865c0..8424af89 100644 --- a/Info/Layer3/Cisco.pm +++ b/Info/Layer3/Cisco.pm @@ -122,7 +122,7 @@ sub i_vlan { } } } - \%i_vlan; + return \%i_vlan; } 1; diff --git a/Info/Layer3/Extreme.pm b/Info/Layer3/Extreme.pm index def2831e..c119aa4d 100644 --- a/Info/Layer3/Extreme.pm +++ b/Info/Layer3/Extreme.pm @@ -223,7 +223,7 @@ sub fan { $s = ", "; } return if ($s eq ""); - $ret; + return $ret; } # Newer versions of the Extreme firmware have vendor-specific tables @@ -291,7 +291,7 @@ sub _if2tag { $if2tag{$if} = -$global_id->{$if} if ($if2tag{$if} == -1 && defined($global_id->{$if})); } } - \%if2tag; + return \%if2tag; } # No partial support in v_name or v_index, because the obivous partial diff --git a/Info/Layer3/Juniper.pm b/Info/Layer3/Juniper.pm index 2d3f5e6b..c2dee83c 100644 --- a/Info/Layer3/Juniper.pm +++ b/Info/Layer3/Juniper.pm @@ -117,7 +117,7 @@ sub i_vlan { } } } - \%i_vlan; + return \%i_vlan; } 1; diff --git a/Info/Layer3/N1600.pm b/Info/Layer3/N1600.pm index 3b06cc11..debc7781 100644 --- a/Info/Layer3/N1600.pm +++ b/Info/Layer3/N1600.pm @@ -71,8 +71,6 @@ $VERSION = '1.09'; # Method OverRides -sub bulkwalk_no { 1; } - sub model { my $n1600 = shift; my $id = $n1600->id();