Permalink
Browse files

added special handling of PhysAddress-TC

  • Loading branch information...
1 parent 274888f commit 1b6d9b11960d72cd9d7f75986bc8d334d2128cef @aduitsis aduitsis committed Jun 27, 2011
Showing with 3 additions and 2 deletions.
  1. +1 −0 lib/SNMP/Class/Varbind/DisplayHint.pm
  2. +1 −1 lib/SNMP/Class/Varbind/MacAddress.pm
  3. +1 −1 t/varbind-roles.t
@@ -15,6 +15,7 @@ INIT {
}
sub matches {
+
( $_[0]->has_label )
&&
defined(SNMP::Class::Utils::get_attr( $_[0]->get_label , 'hint' ))
@@ -17,7 +17,7 @@ sub matches {
&&
( SNMP::Class::Utils::has_textual_convention( $_[0]->get_label ) )
&&
- ( SNMP::Class::Utils::textual_convention_of( $_[0]->get_label ) eq 'MacAddress')
+ ( grep { $_ eq SNMP::Class::Utils::textual_convention_of( $_[0]->get_label ) } qw(MacAddress PhysAddress) )
;
#DEBUG SNMP::Class::Utils::textual_convention_of( $_[0]->get_label );
View
@@ -18,7 +18,7 @@ my $v7 = SNMP::Class::Varbind->new(oid=>"ifPhysAddress.35", value=>"GHIJKL", typ
isa_ok($v7,"SNMP::Class::Varbind");
meta_ok($v7,'has a meta method');
-does_ok($v7,'SNMP::Class::Varbind::DisplayHint',' does the DisplaHint role');
+does_ok($v7,'SNMP::Class::Varbind::DisplayHint',' does the DisplayHint role');

0 comments on commit 1b6d9b1

Please sign in to comment.