r21021 - in /trunk/libmro-compat-perl: ChangeLog META.yml debian/changelog lib/MRO/Compat.pm t/20mros.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sat Jun 14 18:31:00 UTC 2008


Author: gregoa
Date: Sat Jun 14 18:31:00 2008
New Revision: 21021

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=21021
Log:
New upstream release.

Modified:
    trunk/libmro-compat-perl/ChangeLog
    trunk/libmro-compat-perl/META.yml
    trunk/libmro-compat-perl/debian/changelog
    trunk/libmro-compat-perl/lib/MRO/Compat.pm
    trunk/libmro-compat-perl/t/20mros.t

Modified: trunk/libmro-compat-perl/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmro-compat-perl/ChangeLog?rev=21021&op=diff
==============================================================================
--- trunk/libmro-compat-perl/ChangeLog (original)
+++ trunk/libmro-compat-perl/ChangeLog Sat Jun 14 18:31:00 2008
@@ -1,4 +1,10 @@
 Revision history for Perl extension MRO::Compat.
+
+0.09 - Thu Jun 5, 2008
+    - No change from 0.08_01
+
+0.08_01 - Mon Jun 2, 2008
+    - Add fixup (and new tests) for RT#36256
 
 0.07 - Tue May 20, 2008
     - Add explicit dependency on perl 5.6.0 or higher

Modified: trunk/libmro-compat-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmro-compat-perl/META.yml?rev=21021&op=diff
==============================================================================
--- trunk/libmro-compat-perl/META.yml (original)
+++ trunk/libmro-compat-perl/META.yml Sat Jun 14 18:31:00 2008
@@ -18,7 +18,7 @@
 provides: 
   MRO::Compat: 
     file: lib/MRO/Compat.pm
-    version: 0.07
+    version: 0.09
 requires: 
   perl: 5.6.0
-version: 0.07
+version: 0.09

Modified: trunk/libmro-compat-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmro-compat-perl/debian/changelog?rev=21021&op=diff
==============================================================================
--- trunk/libmro-compat-perl/debian/changelog (original)
+++ trunk/libmro-compat-perl/debian/changelog Sat Jun 14 18:31:00 2008
@@ -1,3 +1,9 @@
+libmro-compat-perl (0.09-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org>  Sat, 14 Jun 2008 20:30:28 +0200
+
 libmro-compat-perl (0.07-1) unstable; urgency=low
 
   * New upstream release.

Modified: trunk/libmro-compat-perl/lib/MRO/Compat.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmro-compat-perl/lib/MRO/Compat.pm?rev=21021&op=diff
==============================================================================
--- trunk/libmro-compat-perl/lib/MRO/Compat.pm (original)
+++ trunk/libmro-compat-perl/lib/MRO/Compat.pm Sat Jun 14 18:31:00 2008
@@ -5,7 +5,7 @@
 
 # Keep this < 1.00, so people can tell the fake
 #  mro.pm from the real one
-our $VERSION = '0.07';
+our $VERSION = '0.09';
 
 BEGIN {
     # Alias our private functions over to
@@ -170,22 +170,25 @@
 
 sub __set_mro {
     my ($classname, $type) = @_;
+
     if(!defined $classname || !$type) {
         die q{Usage: mro::set_mro($classname, $type)};
     }
+
     if($type eq 'c3') {
         eval "package $classname; use Class::C3";
         die $@ if $@;
     }
-    if($type ne 'dfs') {
-        die q{Invalid mro type "$type"};
-    }
-
-    # In the dfs case, check whether we need to undo C3
-    if(defined $Class::C3::MRO{$classname}) {
-        Class::C3::_remove_method_dispatch_table($classname);
-    }
-    delete $Class::C3::MRO{$classname};
+    elsif($type eq 'dfs') {
+        # In the dfs case, check whether we need to undo C3
+        if(defined $Class::C3::MRO{$classname}) {
+            Class::C3::_remove_method_dispatch_table($classname);
+        }
+        delete $Class::C3::MRO{$classname};
+    }
+    else {
+        die qq{Invalid mro type "$type"};
+    }
 
     return;
 }

Modified: trunk/libmro-compat-perl/t/20mros.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmro-compat-perl/t/20mros.t?rev=21021&op=diff
==============================================================================
--- trunk/libmro-compat-perl/t/20mros.t (original)
+++ trunk/libmro-compat-perl/t/20mros.t Sat Jun 14 18:31:00 2008
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 8;
+use Test::More tests => 14;
 
 BEGIN {
     use_ok('MRO::Compat');
@@ -28,6 +28,8 @@
     package GGG3; our @ISA = qw/FFF3/; use mro 'c3';
 }
 
+is(mro::get_mro('FFF3'), 'c3');
+
 is_deeply(
   mro::get_linear_isa('GGG'),
   [ 'GGG', 'FFF', 'EEE', 'BBB', 'AAA', 'CCC', 'DDD' ],
@@ -50,16 +52,33 @@
 is(FFF3->testsub(), 'FFF3_first_in_c3', 'c3 resolution post-init');
 
 mro::set_mro('FFF3', 'dfs');
+is(mro::get_mro('FFF3'), 'dfs');
 is_deeply(
   mro::get_linear_isa('FFF3'),
   [ 'FFF3', 'EEE3', 'BBB3', 'AAA3', 'CCC3', 'DDD3' ],
   "get_linear_isa for FFF3 (dfs)",
 );
 
-is(FFF3->testsub(), 'FFF3_first_in_dfs', 'dfs resolution post- setmro dfs');
+is(FFF3->testsub(), 'FFF3_first_in_dfs', 'dfs resolution post- set_mro dfs');
 
 is_deeply(
   mro::get_linear_isa('GGG3'),
   [ 'GGG3', 'FFF3', 'EEE3', 'BBB3', 'CCC3', 'DDD3', 'AAA3' ],
   "get_linear_isa for GGG3 (still c3)",
 );
+
+mro::set_mro('FFF3', 'c3');
+is(mro::get_mro('FFF3'), 'c3');
+is_deeply(
+  mro::get_linear_isa('FFF3'),
+  [ 'FFF3', 'EEE3', 'BBB3', 'CCC3', 'DDD3', 'AAA3' ],
+  "get_linear_isa for FFF3 (reset to c3 via set_mro)",
+);
+
+eval "package FFF3; use mro 'dfs'";
+is(mro::get_mro('FFF3'), 'dfs');
+is_deeply(
+  mro::get_linear_isa('FFF3'),
+  [ 'FFF3', 'EEE3', 'BBB3', 'AAA3', 'CCC3', 'DDD3' ],
+  "get_linear_isa for FFF3 (reset to dfs via 'use mro')",
+);




More information about the Pkg-perl-cvs-commits mailing list