Prevent potential undefined warning in ports() of Layer3::C3550
Add Layer3::C3550 test class
This commit is contained in:
@@ -96,8 +96,8 @@ sub ports {
|
||||
my $c3550 = shift;
|
||||
|
||||
my $id = $c3550->id();
|
||||
my $model = &SNMP::translateObj($id);
|
||||
if ( $model =~ /(12|24|48)(C|T|TS|G|TS-E|TS-S|T-E)?$/ ) {
|
||||
my $model = SNMP::translateObj($id);
|
||||
if ( defined $model && $model =~ /(12|24|48)(C|T|TS|G|TS-E|TS-S|T-E)?$/ ) {
|
||||
return $1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user