- PBP compliance via Perl::Critic

- Use bare return to return failure
- No code before strictures are enabled
This commit is contained in:
Eric Miller
2008-07-09 00:32:47 +00:00
parent 1b85820314
commit 2c5301b676
68 changed files with 464 additions and 415 deletions

View File

@@ -31,17 +31,17 @@
# POSSIBILITY OF SUCH DAMAGE.
package SNMP::Info::Layer1::Allied;
$VERSION = '1.09';
use strict;
use Exporter;
use SNMP::Info::Layer1;
@SNMP::Info::Layer1::Allied::ISA = qw/SNMP::Info::Layer1 Exporter/;
@SNMP::Info::Layer1::Allied::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';
# Set for No CDP
%GLOBALS = (
@@ -87,7 +87,7 @@ sub model {
if ($desc =~ /(AT-\d{4}\S{1}?)/){
return $1;
}
return undef;
return;
}
sub i_name{

View File

@@ -31,17 +31,17 @@
# POSSIBILITY OF SUCH DAMAGE.
package SNMP::Info::Layer1::Asante;
$VERSION = '1.09';
use strict;
use Exporter;
use SNMP::Info::Layer1;
@SNMP::Info::Layer1::Asante::ISA = qw/SNMP::Info::Layer1 Exporter/;
@SNMP::Info::Layer1::Asante::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';
# Set for No CDP
%GLOBALS = (
@@ -148,7 +148,7 @@ sub i_mac {
}
sub i_description {
return undef;
return;
}
sub i_name {

View File

@@ -2,6 +2,7 @@
# $Id$
#
# Copyright (c) 2008 Eric Miller, Max Baker
# 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,9 +29,8 @@
# POSSIBILITY OF SUCH DAMAGE.
package SNMP::Info::Layer1::Bayhub;
$VERSION = '1.09';
use strict;
use strict;
use Exporter;
use SNMP::Info::SONMP;
use SNMP::Info::NortelStack;
@@ -39,7 +39,9 @@ use SNMP::Info::Layer2;
@SNMP::Info::Layer1::Bayhub::ISA = qw/SNMP::Info::SONMP SNMP::Info::NortelStack SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer1::Bayhub::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,
@@ -95,7 +97,7 @@ sub vendor {
sub model {
my $bayhub = shift;
my $id = $bayhub->id();
return undef unless defined $id;
return unless defined $id;
my $model = &SNMP::translateObj($id);
return $id unless defined $model;
$model =~ s/^sreg-//i;

View File

@@ -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,9 +29,8 @@
# POSSIBILITY OF SUCH DAMAGE.
package SNMP::Info::Layer1::Cyclades;
$VERSION = '1.09';
use strict;
use strict;
use Exporter;
use SNMP::Info::Layer1;
@@ -39,6 +39,8 @@ use SNMP::Info::Layer1;
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD/;
$VERSION = '1.09';
%MIBS = (
%SNMP::Info::Layer1::MIBS,
'CYCLADES-ACS-SYS-MIB' => 'cyACSversion',
@@ -91,7 +93,7 @@ sub model {
my $model = $cyclades->cy_model();
return undef unless defined $model;
return unless defined $model;
return lc($model);
}

View File

@@ -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::Layer1::S3000;
$VERSION = '1.09';
use strict;
use strict;
use Exporter;
use SNMP::Info::Layer2;
@SNMP::Info::Layer1::S3000::ISA = qw/SNMP::Info::Layer2 Exporter/;
@SNMP::Info::Layer1::S3000::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,7 +92,7 @@ sub vendor {
sub model {
my $s3000 = shift;
my $id = $s3000->id();
return undef unless defined $id;
return unless defined $id;
my $model = &SNMP::translateObj($id);
return $id unless defined $model;
$model =~ s/^s3reg-//i;
@@ -121,7 +123,7 @@ sub mac {
return $mac;
}
# Topology turned off, not supported.
return undef;
return;
}
# Hubs do not support ifMIB requirements for get MAC