In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/ce32bd79dfcbeb40131d6895c3ca24fb37083ac6?hp=1128f77aee1154a21a84d79d5ac3cb4c706dc058>

- Log -----------------------------------------------------------------
commit ce32bd79dfcbeb40131d6895c3ca24fb37083ac6
Author: Steffen Mueller <[email protected]>
Date:   Tue Sep 22 11:12:28 2009 +0200

    Sean is passing Class::ISA maintenance to Steffen

M       Porting/Maintainers.pl

commit 3129f539412cb3df48f5c2a95d2b33b38af7e89f
Author: Steffen Mueller <[email protected]>
Date:   Mon Sep 21 16:58:49 2009 +0200

    Deprecate Class::ISA from core

M       ext/Class-ISA/lib/Class/ISA.pm
M       ext/Class-ISA/t/01_old_junk.t

commit 00f261ef41d6be5447d49f9e25a6aafeb2871793
Author: Steffen Mueller <[email protected]>
Date:   Mon Sep 21 16:56:04 2009 +0200

    Remove Class::ISA use from autouse tests
    
    Instead, include an ultra-simple module for testing in t/lib.

M       ext/autouse/t/autouse.t
A       ext/autouse/t/lib/MyTestModule.pm

commit 8b2b9f856f78ceb0ba1881ae5d55c96b0833425d
Author: Steffen Mueller <[email protected]>
Date:   Mon Sep 21 16:40:48 2009 +0200

    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.

M       lib/perl5db.pl
-----------------------------------------------------------------------

Summary of changes:
 Porting/Maintainers.pl            |    4 +-
 ext/Class-ISA/lib/Class/ISA.pm    |    4 ++-
 ext/Class-ISA/t/01_old_junk.t     |    2 +-
 ext/autouse/t/autouse.t           |    9 +++++--
 ext/autouse/t/lib/MyTestModule.pm |    8 +++++++
 lib/perl5db.pl                    |   39 ++++++++++++++----------------------
 6 files changed, 35 insertions(+), 31 deletions(-)
 create mode 100644 ext/autouse/t/lib/MyTestModule.pm

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 1ae2057..8524b1a 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -315,11 +315,11 @@ use File::Glob qw(:case);
 
     'Class::ISA' =>
        {
-       'MAINTAINER'    => 'sburke',
+       'MAINTAINER'    => 'smueller',
        'DISTRIBUTION'  => 'SBURKE/Class-ISA-0.33.tar.gz',
        'FILES'         => q[ext/Class-ISA],
        'CPAN'          => 1,
-       'UPSTREAM'      => undef,
+       'UPSTREAM'      => 'cpan',
        },
 
     'Compress::Raw::Bzip2' =>
diff --git a/ext/Class-ISA/lib/Class/ISA.pm b/ext/Class-ISA/lib/Class/ISA.pm
index e137191..d25da58 100644
--- a/ext/Class-ISA/lib/Class/ISA.pm
+++ b/ext/Class-ISA/lib/Class/ISA.pm
@@ -5,9 +5,11 @@ package Class::ISA;
 require 5;
 use strict;
 use vars qw($Debug $VERSION);
-$VERSION = '0.33';
+$VERSION = '0.33_01';
 $Debug = 0 unless defined $Debug;
 
+use if $] >= 5.011, 'deprecate';
+
 =head1 NAME
 
 Class::ISA -- report the search path for a class's ISA tree
diff --git a/ext/Class-ISA/t/01_old_junk.t b/ext/Class-ISA/t/01_old_junk.t
index 8afe373..d550bcb 100644
--- a/ext/Class-ISA/t/01_old_junk.t
+++ b/ext/Class-ISA/t/01_old_junk.t
@@ -1,6 +1,6 @@
 BEGIN {
     chdir 't' if -d 't';
-    @INC = '../lib';
+    #...@inc = '../lib';
 }
 
 # Time-stamp: "2004-12-29 19:59:33 AST"
diff --git a/ext/autouse/t/autouse.t b/ext/autouse/t/autouse.t
index 42caf17..522a025 100644
--- a/ext/autouse/t/autouse.t
+++ b/ext/autouse/t/autouse.t
@@ -64,6 +64,9 @@ ok( $@, qr/^\Qautoused module Env has unique import() method/ 
);
 # Check that UNIVERSAL.pm doesn't interfere with modules that don't use
 # Exporter and have no import() of their own.
 require UNIVERSAL;
-autouse->import("Class::ISA" => 'self_and_super_versions');
-my %versions = self_and_super_versions("Class::ISA");
-ok( $versions{"Class::ISA"}, $Class::ISA::VERSION );
+require File::Spec;
+unshift @INC, File::Spec->catdir('t', 'lib'), 'lib';
+autouse->import("MyTestModule" => 'test_function');
+my $ret = test_function();
+ok( $ret, 'works' );
+
diff --git a/ext/autouse/t/lib/MyTestModule.pm 
b/ext/autouse/t/lib/MyTestModule.pm
new file mode 100644
index 0000000..f650a45
--- /dev/null
+++ b/ext/autouse/t/lib/MyTestModule.pm
@@ -0,0 +1,8 @@
+package MyTestModule;
+use strict;
+
+sub test_function {
+  return 'works';
+}
+
+1;
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
 

--
Perl5 Master Repository

Reply via email to