From 8b2b9f856f78ceb0ba1881ae5d55c96b0833425d Mon Sep 17 00:00:00 2001 From: Steffen Mueller Date: Mon, 21 Sep 2009 16:40:48 +0200 Subject: Remove use of Class::ISA from the debugger Instead, use mro::get_linear_isa which accomplishes the same feat. This allows us to remove another module from core. --- lib/perl5db.pl | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) (limited to 'lib/perl5db.pl') diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 7d824bbb03..b3daaf55ab 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -4835,30 +4835,21 @@ Display the (nested) parentage of the module or object given. sub cmd_i { my $cmd = shift; my $line = shift; - eval { require Class::ISA }; - if ($@) { - &warn( $@ =~ /locate/ - ? "Class::ISA module not found - please install\n" - : $@ ); - } - else { - ISA: - foreach my $isa ( split( /\s+/, $line ) ) { - $evalarg = $isa; - ($isa) = &eval; - no strict 'refs'; - print join( - ', ', - map { # snaffled unceremoniously from Class::ISA - "$_" - . ( - defined( ${"$_\::VERSION"} ) - ? ' ' . ${"$_\::VERSION"} - : undef ) - } Class::ISA::self_and_super_path(ref($isa) || $isa) - ); - print "\n"; - } + foreach my $isa ( split( /\s+/, $line ) ) { + $evalarg = $isa; + ($isa) = &eval; + no strict 'refs'; + print join( + ', ', + map { + "$_" + . ( + defined( ${"$_\::VERSION"} ) + ? ' ' . ${"$_\::VERSION"} + : undef ) + } @{mro::get_linear_isa(ref($isa) || $isa)} + ); + print "\n"; } } ## end sub cmd_i -- cgit v1.2.1