r22242 - in /branches/upstream/libscalar-defer-perl/current: Changes MANIFEST META.yml SIGNATURE lib/Scalar/Defer.pm t/01-basic.t

yvesago-guest at users.alioth.debian.org yvesago-guest at users.alioth.debian.org
Sat Jun 28 14:54:50 UTC 2008


Author: yvesago-guest
Date: Sat Jun 28 14:54:49 2008
New Revision: 22242

URL: http://svn.debian.org/wsvn/?sc=1&rev=22242
Log:
[svn-upgrade] Integrating new upstream version, libscalar-defer-perl (0.15)

Modified:
    branches/upstream/libscalar-defer-perl/current/Changes
    branches/upstream/libscalar-defer-perl/current/MANIFEST
    branches/upstream/libscalar-defer-perl/current/META.yml
    branches/upstream/libscalar-defer-perl/current/SIGNATURE
    branches/upstream/libscalar-defer-perl/current/lib/Scalar/Defer.pm
    branches/upstream/libscalar-defer-perl/current/t/01-basic.t

Modified: branches/upstream/libscalar-defer-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-defer-perl/current/Changes?rev=22242&op=diff
==============================================================================
--- branches/upstream/libscalar-defer-perl/current/Changes (original)
+++ branches/upstream/libscalar-defer-perl/current/Changes Sat Jun 28 14:54:49 2008
@@ -1,3 +1,9 @@
+[Changes for 0.15 - 2008-06-27]
+
+* Fix infinite recursion on UNIVERSAL methods used as class methods on
+  Scalar::Defer::Deferred itself.
+  http://rt.cpan.org/Public/Bug/Display.html?id=37153
+
 [Changes for 0.14 - 2008-01-09]
 
 * Avoid harmless '(in cleanup)' warnings caused by Class::InsideOut's

Modified: branches/upstream/libscalar-defer-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-defer-perl/current/MANIFEST?rev=22242&op=diff
==============================================================================
--- branches/upstream/libscalar-defer-perl/current/MANIFEST (original)
+++ branches/upstream/libscalar-defer-perl/current/MANIFEST Sat Jun 28 14:54:49 2008
@@ -19,6 +19,6 @@
 MANIFEST			This list of files
 META.yml
 README
-SIGNATURE			Public-key signature (added by MakeMaker)
 t/01-basic.t
 t/02-is.t
+SIGNATURE                                Public-key signature (added by MakeMaker)

Modified: branches/upstream/libscalar-defer-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-defer-perl/current/META.yml?rev=22242&op=diff
==============================================================================
--- branches/upstream/libscalar-defer-perl/current/META.yml (original)
+++ branches/upstream/libscalar-defer-perl/current/META.yml Sat Jun 28 14:54:49 2008
@@ -16,11 +16,11 @@
 provides: 
   Scalar::Defer: 
     file: lib/Scalar/Defer.pm
-    version: 0.14
+    version: 0.15
   Scalar::Defer::Deferred: 
     file: lib/Scalar/Defer.pm
 requires: 
   Class::InsideOut: 0
   Exporter::Lite: 0
   perl: 5.6.0
-version: 0.14
+version: 0.15

Modified: branches/upstream/libscalar-defer-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-defer-perl/current/SIGNATURE?rev=22242&op=diff
==============================================================================
--- branches/upstream/libscalar-defer-perl/current/SIGNATURE (original)
+++ branches/upstream/libscalar-defer-perl/current/SIGNATURE Sat Jun 28 14:54:49 2008
@@ -14,9 +14,9 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 dbace35e86d2cd9c43f1579b4a71be33cc8fa175 Changes
-SHA1 b8b33e7c6842a35e19c63c7142be3e5e256da149 MANIFEST
-SHA1 73af285145fcd1a4df58ddc59b89ec3d1c553e51 META.yml
+SHA1 fecb756fba00cbb410b9e1fdbc77428d02c21e3a Changes
+SHA1 87264922034d0f62430c0b54b72f67a7eec55305 MANIFEST
+SHA1 795a01606557ef5a5a9b9b4e12960e734f0069b0 META.yml
 SHA1 91868dc8231c258af600393393c7fb0362935e85 Makefile.PL
 SHA1 91735f73073ea3d7b2d64047e45d25355f516752 README
 SHA1 603bb9de29fb8cba7f13409c546750972eff645d inc/Module/AutoInstall.pm
@@ -34,13 +34,13 @@
 SHA1 6e95f0ebeb31abc5608a987e88edf2e2427912c4 inc/Test/Builder/Module.pm
 SHA1 1296aa4ac787d6df9f9679d2bae4851ffef63e5a inc/Test/More.pm
 SHA1 55be398173a2d979a648a73a28c8b3a40531dbba inc/ok.pm
-SHA1 b3920fe09164f1d57a49f4663d45c3a7f7161327 lib/Scalar/Defer.pm
-SHA1 a73b56637ebefda31495df2c2e2e5c06d3bfe3f9 t/01-basic.t
+SHA1 b667e77f08dfff82d02ab46b82fe7a1909c4e891 lib/Scalar/Defer.pm
+SHA1 f89e83f7a812e3b8c6afe96bb087d0b8218cbd04 t/01-basic.t
 SHA1 2be303573646cd1aee91665c353bce5cb0efd349 t/02-is.t
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.3 (Darwin)
 
-iD8DBQFHg+PvtLPdNzw1AaARAodgAJ45OqeHizZUyoDEQ1QShHhOoFwi1ACfT/V4
-S/qKNx2GmoZdyd/cd4JGrEY=
-=YK2q
+iD8DBQFIZQ+itLPdNzw1AaARAteFAJ9yPqpLExwQi6kuuj2R81DpAeqtEQCgs921
+aaAEaTdZexNhXS7ZuVuOuGQ=
+=SjXY
 -----END PGP SIGNATURE-----

Modified: branches/upstream/libscalar-defer-perl/current/lib/Scalar/Defer.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-defer-perl/current/lib/Scalar/Defer.pm?rev=22242&op=diff
==============================================================================
--- branches/upstream/libscalar-defer-perl/current/lib/Scalar/Defer.pm (original)
+++ branches/upstream/libscalar-defer-perl/current/lib/Scalar/Defer.pm Sat Jun 28 14:54:49 2008
@@ -5,7 +5,7 @@
 use warnings;
 
 BEGIN {
-    our $VERSION   = '0.14';
+    our $VERSION   = '0.15';
     our @EXPORT    = qw( lazy defer force );
     our @EXPORT_OK = qw( is_deferred );
 }
@@ -100,14 +100,21 @@
     };
 
     {
-        no strict 'refs';
-        no warnings 'redefine';
-
-        foreach my $sym (keys %UNIVERSAL::) {
-            *{$sym} = sub {
-                unshift @_, Scalar::Defer::SUB_FORCE()->(shift(@_));
-                goto &{$_[0]->can($sym)};
-            };
+        foreach my $sym (grep { $_ ne 'DESTROY' } keys %UNIVERSAL::) {
+            my $code = q[
+                sub $sym {
+                    if ( defined Scalar::Util::blessed($_[0]) ) {
+                        unshift @_, Scalar::Defer::SUB_FORCE()->(shift(@_));
+                        goto &{$_[0]->can("$sym")};
+                    } else {
+                        return shift->SUPER::$sym(@_);
+                    }
+                }
+            ];
+
+            $code =~ s/\$sym/$sym/ge;
+
+            eval $code;
         }
 
         *DESTROY  = \&Scalar::Defer::DESTROY;

Modified: branches/upstream/libscalar-defer-perl/current/t/01-basic.t
URL: http://svn.debian.org/wsvn/branches/upstream/libscalar-defer-perl/current/t/01-basic.t?rev=22242&op=diff
==============================================================================
--- branches/upstream/libscalar-defer-perl/current/t/01-basic.t (original)
+++ branches/upstream/libscalar-defer-perl/current/t/01-basic.t Sat Jun 28 14:54:49 2008
@@ -1,4 +1,4 @@
-use Test::More tests => 14;
+use Test::More tests => 19;
 use ok 'Scalar::Defer';
 
 my ($x, $y);
@@ -27,3 +27,10 @@
 is($obj->can('meth'), SomeClass->can('meth'), '->can works too');
 ok($obj->isa('SomeClass'), '->isa works too');
 is($obj->VERSION, SomeClass->VERSION, '->VERSION works too');
+
+ok( Scalar::Defer->can("can"), "can('can') as a class method" );
+ok( !Scalar::Defer::Deferred->can('blah'), "can('blah') is false as a class method" );
+
+ok( $obj->can("can"), "can('can') as an object method" );
+ok( $obj->can("meth"), "can('meth')");
+ok( !$obj->can('blah'), "can('blah') is false as an object method" );




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