- PBP compliance via Perl::Critic
- Use bare return to return failure - No code before strictures are enabled
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2008 Eric Miller
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
@@ -28,16 +29,17 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package SNMP::Info::Layer2::Aruba;
|
||||
$VERSION = '1.09';
|
||||
use strict;
|
||||
|
||||
use strict;
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer2;
|
||||
|
||||
@SNMP::Info::Layer2::Aruba::ISA = qw/SNMP::Info::Layer2 Exporter/;
|
||||
@SNMP::Info::Layer2::Aruba::EXPORT_OK = qw//;
|
||||
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
||||
|
||||
$VERSION = '1.09';
|
||||
|
||||
%MIBS = (
|
||||
%SNMP::Info::Layer2::MIBS,
|
||||
@@ -90,19 +92,19 @@ sub vendor {
|
||||
sub os_ver {
|
||||
my $aruba = shift;
|
||||
my $descr = $aruba->description();
|
||||
return undef unless defined $descr;
|
||||
return unless defined $descr;
|
||||
|
||||
if ($descr =~ m/Version\s+(\d+\.\d+\.\d+\.\d+)/){
|
||||
return $1;
|
||||
}
|
||||
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
sub model {
|
||||
my $aruba = shift;
|
||||
my $id = $aruba->id();
|
||||
return undef unless defined $id;
|
||||
return unless defined $id;
|
||||
my $model = &SNMP::translateObj($id);
|
||||
return $id unless defined $model;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user