From: Steffen Mueller Date: Mon, 21 Sep 2009 14:40:48 +0000 (+0200) Subject: Remove use of Class::ISA from the debugger X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8b2b9f856f78ceb0ba1881ae5d55c96b0833425d;p=p5sagit%2Fp5-mst-13.2.git 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. --- diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 7d824bb..b3daaf5 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