r7005 - in /trunk/libmro-compat-perl: ChangeLog META.yml Makefile.PL README debian/changelog lib/MRO/Compat.pm

eloy at users.alioth.debian.org eloy at users.alioth.debian.org
Mon Aug 20 12:54:12 UTC 2007


Author: eloy
Date: Mon Aug 20 12:54:12 2007
New Revision: 7005

URL: http://svn.debian.org/wsvn/?sc=1&rev=7005
Log:
new upstream version

Modified:
    trunk/libmro-compat-perl/ChangeLog
    trunk/libmro-compat-perl/META.yml
    trunk/libmro-compat-perl/Makefile.PL
    trunk/libmro-compat-perl/README
    trunk/libmro-compat-perl/debian/changelog
    trunk/libmro-compat-perl/lib/MRO/Compat.pm

Modified: trunk/libmro-compat-perl/ChangeLog
URL: http://svn.debian.org/wsvn/trunk/libmro-compat-perl/ChangeLog?rev=7005&op=diff
==============================================================================
--- trunk/libmro-compat-perl/ChangeLog (original)
+++ trunk/libmro-compat-perl/ChangeLog Mon Aug 20 12:54:12 2007
@@ -1,4 +1,10 @@
 Revision history for Perl extension MRO::Compat.
+
+0.04 - Wed July 18, 2007
+    - Removed doc warning now that 5.9.5 is out
+    - Stopped the code from assuming valid classnames
+      are true in boolean context
+    - Misc small tweaks
 
 0.03 - Mon Jun 4, 2007
     - Bumped C3 requirements

Modified: trunk/libmro-compat-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libmro-compat-perl/META.yml?rev=7005&op=diff
==============================================================================
--- trunk/libmro-compat-perl/META.yml (original)
+++ trunk/libmro-compat-perl/META.yml Mon Aug 20 12:54:12 2007
@@ -17,7 +17,7 @@
 provides: 
   MRO::Compat: 
     file: lib/MRO/Compat.pm
-    version: 0.03
+    version: 0.04
 requires: 
   Class::C3: 0.19
-version: 0.03
+version: 0.04

Modified: trunk/libmro-compat-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/trunk/libmro-compat-perl/Makefile.PL?rev=7005&op=diff
==============================================================================
--- trunk/libmro-compat-perl/Makefile.PL (original)
+++ trunk/libmro-compat-perl/Makefile.PL Mon Aug 20 12:54:12 2007
@@ -1,20 +1,17 @@
 use inc::Module::Install 0.65;
 
-name           'MRO-Compat';
-all_from       'lib/MRO/Compat.pm';
+name          'MRO-Compat';
+all_from      'lib/MRO/Compat.pm';
 
 test_requires 'Test::More'    => '0.47';
 
 if($] < 5.009_005) {
-    feature  'XS Speedups',
-        'Class::C3::XS' => '0.07';
-    requires 'Class::C3'     => '0.19';
+    feature  'XS Speedups', 'Class::C3::XS' => '0.08';
+    requires 'Class::C3' => '0.19';
 }
 
 # Rebuild README for maintainers
-if(-e 'MANIFEST.SKIP') {
-    system("pod2text lib/MRO/Compat.pm >README");
-}
+system("pod2text lib/MRO/Compat.pm >README") if -e 'MANIFEST.SKIP';
 
 auto_provides;
 auto_install;

Modified: trunk/libmro-compat-perl/README
URL: http://svn.debian.org/wsvn/trunk/libmro-compat-perl/README?rev=7005&op=diff
==============================================================================
--- trunk/libmro-compat-perl/README (original)
+++ trunk/libmro-compat-perl/README Mon Aug 20 12:54:12 2007
@@ -21,13 +21,17 @@
     This module provides those interfaces for earlier versions of Perl (back
     to 5.6.0 anyways).
 
-    It is a harmless no-op to use this module on 5.9.5+. If you're writing a
-    piece of software that would like to use the parts of 5.9.5+'s mro::
-    interfaces that are supported here, and you want compatibility with
-    older Perls, this is the module for you.
+    It is a harmless no-op to use this module on 5.9.5+. That is to say,
+    code which properly uses MRO::Compat will work unmodified on both older
+    Perls and 5.9.5+.
 
-    Some parts of this interface will work better with Class::C3::XS
-    installed, but it's not a requirement.
+    If you're writing a piece of software that would like to use the parts
+    of 5.9.5+'s mro:: interfaces that are supported here, and you want
+    compatibility with older Perls, this is the module for you.
+
+    Some parts of this code will work better and/or faster with
+    Class::C3::XS installed (which is an optional prereq of Class::C3, which
+    is in turn a prereq of this package), but it's not a requirement.
 
     This module never exports any functions. All calls must be fully
     qualified with the "mro::" prefix.
@@ -37,16 +41,6 @@
     MRO::Compat and 5.9.5+ one should look out for. The main docs in 5.9.5's
     mro are the real interface docs, and contain a lot of other useful
     information.
-
-VERSION 0.02
-    This is the first release of this new module, and on top of that, the
-    Perl 5.9.5 it seeks to provide compatibility with isn't even out yet.
-
-    If you're going to use/depend on this, please keep abreast of possible
-    interface changes in the next few versions. Once Perl 5.9.5 is out the
-    door the interfaces should stabilize on whatever 5.9.5 has to offer. In
-    the meantime, don't be surprised if MRO::Compat and 5.9.5's interfaces
-    aren't perfectly in sync at all times.
 
 Functions
   mro::get_linear_isa($classname[, $type])
@@ -122,14 +116,11 @@
     "mro::set_mro("Foo", 'c3')" available on older Perls, it does so merely
     by passing off the work to Class::C3.
 
-    It does not remove the need for you to call Class::C3's "initialize()",
-    "reinitialize()", and/or "uninitialize()" at the appropriate times as
-    documented in the Class::C3 docs.
-
-    Because MRO::Compat has Class::C3 as a pre-requisite, and requires it at
-    "use" time, you can blindly call those functions in code that uses
-    MRO::Compat. Under 5.9.5+ with MRO::Compat, your calls to those
-    functions will become a no-op and everything will work fine.
+    It does not remove the need for you to call "Class::C3::initialize()",
+    "Class::C3::reinitialize()", and/or "Class::C3::uninitialize()" at the
+    appropriate times as documented in the Class::C3 docs. These three
+    functions are always provided by MRO::Compat, either via Class::C3
+    itself on older Perls, or directly as no-ops on 5.9.5+.
 
 SEE ALSO
     Class::C3

Modified: trunk/libmro-compat-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libmro-compat-perl/debian/changelog?rev=7005&op=diff
==============================================================================
--- trunk/libmro-compat-perl/debian/changelog (original)
+++ trunk/libmro-compat-perl/debian/changelog Mon Aug 20 12:54:12 2007
@@ -1,8 +1,12 @@
-libmro-compat-perl (0.03-2) UNRELEASED; urgency=low
+libmro-compat-perl (0.04-1) unstable; urgency=low
 
+  [ Krzysztof Krzyzaniak (eloy) <eloy at debian.org> ]
+  * New upstream release
+
+  [ Damyan Ivanov <dmn at debian.org> ]
   * Updated debian/watch to use by-authors download area
 
- -- Damyan Ivanov <dmn at debian.org>  Thu, 19 Jul 2007 18:21:35 +0300
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org>  Mon, 20 Aug 2007 14:49:04 +0200
 
 libmro-compat-perl (0.03-1) unstable; urgency=low
 

Modified: trunk/libmro-compat-perl/lib/MRO/Compat.pm
URL: http://svn.debian.org/wsvn/trunk/libmro-compat-perl/lib/MRO/Compat.pm?rev=7005&op=diff
==============================================================================
--- trunk/libmro-compat-perl/lib/MRO/Compat.pm (original)
+++ trunk/libmro-compat-perl/lib/MRO/Compat.pm Mon Aug 20 12:54:12 2007
@@ -5,7 +5,7 @@
 
 # Keep this < 1.00, so people can tell the fake
 #  mro.pm from the real one
-our $VERSION = '0.03';
+our $VERSION = '0.04';
 
 BEGIN {
     # Alias our private functions over to
@@ -70,14 +70,19 @@
 This module provides those interfaces for
 earlier versions of Perl (back to 5.6.0 anyways).
 
-It is a harmless no-op to use this module on 5.9.5+.  If
-you're writing a piece of software that would like to use
+It is a harmless no-op to use this module on 5.9.5+.  That
+is to say, code which properly uses L<MRO::Compat> will work
+unmodified on both older Perls and 5.9.5+.
+
+If you're writing a piece of software that would like to use
 the parts of 5.9.5+'s mro:: interfaces that are supported
 here, and you want compatibility with older Perls, this
 is the module for you.
 
-Some parts of this interface will work better with
-L<Class::C3::XS> installed, but it's not a requirement.
+Some parts of this code will work better and/or faster with
+L<Class::C3::XS> installed (which is an optional prereq
+of L<Class::C3>, which is in turn a prereq of this
+package), but it's not a requirement.
 
 This module never exports any functions.  All calls must
 be fully qualified with the C<mro::> prefix.
@@ -87,19 +92,6 @@
 differences between L<MRO::Compat> and 5.9.5+ one should
 look out for.  The main docs in 5.9.5's L<mro> are the real
 interface docs, and contain a lot of other useful information.
-
-=head1 VERSION 0.02
-
-This is the first release of this new module, and on top of that,
-the Perl 5.9.5 it seeks to provide compatibility with isn't even
-out yet.
-
-If you're going to use/depend on this, please keep abreast of
-possible interface changes in the next few versions.  Once Perl
-5.9.5 is out the door the interfaces should stabilize on whatever
-5.9.5 has to offer.  In the meantime, don't be surprised if
-L<MRO::Compat> and 5.9.5's interfaces aren't perfectly in sync
-at all times.
 
 =head1 Functions
 
@@ -140,7 +132,7 @@
 
 sub __get_linear_isa {
     my ($classname, $type) = @_;
-    die "mro::get_mro requires a classname" if !$classname;
+    die "mro::get_mro requires a classname" if !defined $classname;
 
     $type ||= __get_mro($classname);
     if($type eq 'dfs') {
@@ -178,7 +170,7 @@
 
 sub __set_mro {
     my ($classname, $type) = @_;
-    if(!$classname || !$type) {
+    if(!defined $classname || !$type) {
         die q{Usage: mro::set_mro($classname, $type)};
     }
     if($type eq 'c3') {
@@ -209,7 +201,7 @@
 
 sub __get_mro {
     my $classname = shift;
-    die "mro::get_mro requires a classname" if !$classname;
+    die "mro::get_mro requires a classname" if !defined $classname;
     return 'c3' if exists $Class::C3::MRO{$classname};
     return 'dfs';
 }
@@ -248,8 +240,7 @@
     push(@retval, $search) if scalar(@$isa);
 
     foreach my $cand (keys %{"$search\::"}) {
-        if($cand =~ /::$/) {
-            $cand =~ s/::$//;
+        if($cand =~ s/::$//) {
             next if $cand eq $search; # skip self-reference (main?)
             push(@retval, @{__get_all_pkgs_with_isas($pfx . $cand)});
         }
@@ -286,7 +277,7 @@
 
 sub __get_isarev {
     my $classname = shift;
-    die "mro::get_isarev requires a classname" if !$classname;
+    die "mro::get_isarev requires a classname" if !defined $classname;
 
     __get_isarev_recurse($classname, __get_all_pkgs_with_isas(), 0);
 }
@@ -305,7 +296,7 @@
 
 sub __is_universal {
     my $classname = shift;
-    die "mro::is_universal requires a classname" if !$classname;
+    die "mro::is_universal requires a classname" if !defined $classname;
 
     my $lin = __get_linear_isa('UNIVERSAL');
     foreach (@$lin) {
@@ -328,7 +319,7 @@
 
 sub __invalidate_all_method_caches {
     # Super secret mystery code :)
-    @fedcba98::ISA = @fedcba98::ISA;
+    @f845a9c1ac41be33::ISA = @f845a9c1ac41be33::ISA;
     return;
 }
 
@@ -349,7 +340,7 @@
 
 sub __method_changed_in {
     my $classname = shift;
-    die "mro::method_changed_in requires a classname" if !$classname;
+    die "mro::method_changed_in requires a classname" if !defined $classname;
 
     __invalidate_all_method_caches();
 }
@@ -363,16 +354,18 @@
 
 =cut
 
-my $__pkg_gen = 2;
-sub __get_pkg_gen_pp {
-    my $classname = shift;
-    die "mro::get_pkg_gen requires a classname" if !$classname;
-    return $__pkg_gen++;
+{
+    my $__pkg_gen = 2;
+    sub __get_pkg_gen_pp {
+        my $classname = shift;
+        die "mro::get_pkg_gen requires a classname" if !defined $classname;
+        return $__pkg_gen++;
+    }
 }
 
 sub __get_pkg_gen_c3xs {
     my $classname = shift;
-    die "mro::get_pkg_gen requires a classname" if !$classname;
+    die "mro::get_pkg_gen requires a classname" if !defined $classname;
 
     return Class::C3::XS::_plsubgen();
 }
@@ -385,15 +378,11 @@
 to L<Class::C3>.
 
 It does not remove the need for you to call
-L<Class::C3>'s C<initialize()>, C<reinitialize()>, and/or
-C<uninitialize()> at the appropriate times
-as documented in the L<Class::C3> docs.
-
-Because L<MRO::Compat> has L<Class::C3> as a pre-requisite,
-and requires it at C<use> time, you can blindly call
-those functions in code that uses L<MRO::Compat>.
-Under 5.9.5+ with L<MRO::Compat>, your calls to those
-functions will become a no-op and everything will work fine.
+C<Class::C3::initialize()>, C<Class::C3::reinitialize()>, and/or
+C<Class::C3::uninitialize()> at the appropriate times
+as documented in the L<Class::C3> docs.  These three functions
+are always provided by L<MRO::Compat>, either via L<Class::C3>
+itself on older Perls, or directly as no-ops on 5.9.5+.
 
 =head1 SEE ALSO
 




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