summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteffen Mueller <smueller@cpan.org>2009-09-21 16:40:48 +0200
committerSteffen Mueller <smueller@cpan.org>2009-09-21 16:40:48 +0200
commit8b2b9f856f78ceb0ba1881ae5d55c96b0833425d (patch)
treea24da6268d14d2bccdae5f2b01014aa637a72c0b /lib
parent1128f77aee1154a21a84d79d5ac3cb4c706dc058 (diff)
downloadperl-8b2b9f856f78ceb0ba1881ae5d55c96b0833425d.tar.gz
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/perl5db.pl39
1 files changed, 15 insertions, 24 deletions
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