diff --git a/ChangeLog b/ChangeLog index c47cee77..854dacde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,7 @@ version 3.16 [ENHANCEMENTS] - * Add superclass discovery methods (super_path and print_super_path) + * Add method resolution discovery in SNMP::Info::MRO helper module version 3.15 (2014-07-10) diff --git a/Info.pm b/Info.pm index 94bc811b..601ac8bc 100644 --- a/Info.pm +++ b/Info.pm @@ -1223,56 +1223,6 @@ sub new { return $auto_specific ? $new_obj->specify() : $new_obj; } -=item super_path() - -Returns the list (in order) of the names of classes Perl will search to find -methods for this SNMP::Info class or object instance. - -Can be called as either a class or object method: - - # class method: - my @list = SNMP::Info::Layer3::Juniper->super_path(); - # object method: - my @list = $info->super_path(); - -Note this B the L distribution to be installed. - -=cut - -sub super_path { - my $self = shift; - my $class = (ref $self ? ref $self : $self); - - # Load Class::ISA, if we can - eval { require Class::ISA }; ## no critic - if ($@) { - croak "SNMP::Info::super_path() Failed to load Class::ISA (is it installed?). $@\n"; - } - else { - return Class::ISA::self_and_super_path( $class ); - } -} - -=item print_super_path() - -Prints the list (in order) of the names of classes Perl will search to find -methods for this SNMP::Info class or object instance. - -Can be called as either a class or object method: - - # class method: - SNMP::Info::Layer3::Juniper->print_super_path(); - # object method: - $info->print_super_path(); - -Note this B the L distribution to be installed. - -=cut - -sub print_super_path { - print join ("\n", (shift)->super_path), "\n"; -} - =item update() Replace the existing session with a new one with updated values,