r50979 - in /branches/upstream/libuniversal-can-perl/current: Changes MANIFEST META.yml README lib/UNIVERSAL/can.pm t/deep-recursion.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Fri Jan 15 02:18:46 UTC 2010


Author: jawnsy-guest
Date: Fri Jan 15 02:18:29 2010
New Revision: 50979

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=50979
Log:
[svn-upgrade] Integrating new upstream version, libuniversal-can-perl (1.16)

Added:
    branches/upstream/libuniversal-can-perl/current/t/deep-recursion.t
Modified:
    branches/upstream/libuniversal-can-perl/current/Changes
    branches/upstream/libuniversal-can-perl/current/MANIFEST
    branches/upstream/libuniversal-can-perl/current/META.yml
    branches/upstream/libuniversal-can-perl/current/README
    branches/upstream/libuniversal-can-perl/current/lib/UNIVERSAL/can.pm

Modified: branches/upstream/libuniversal-can-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libuniversal-can-perl/current/Changes?rev=50979&op=diff
==============================================================================
--- branches/upstream/libuniversal-can-perl/current/Changes (original)
+++ branches/upstream/libuniversal-can-perl/current/Changes Fri Jan 15 02:18:29 2010
@@ -1,4 +1,7 @@
 Revision history for UNIVERSAL::can
+
+1.16  Thu Jan 14 22:55:10 UTC 2010
+    - applied patch to fix deep recursion crash (RT #49580, Daniel LeWarne)
 
 1.15  Mon Jun 22 20:39:48 UTC 2009
     - moved Module::Build dependency to config_requires (RT #47165, hdp)

Modified: branches/upstream/libuniversal-can-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libuniversal-can-perl/current/MANIFEST?rev=50979&op=diff
==============================================================================
--- branches/upstream/libuniversal-can-perl/current/MANIFEST (original)
+++ branches/upstream/libuniversal-can-perl/current/MANIFEST Fri Jan 15 02:18:29 2010
@@ -9,5 +9,6 @@
 t/always_warn.t
 t/bad-input.t
 t/class.t
+t/deep-recursion.t
 t/object.t
 t/SUPER-can.t

Modified: branches/upstream/libuniversal-can-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libuniversal-can-perl/current/META.yml?rev=50979&op=diff
==============================================================================
--- branches/upstream/libuniversal-can-perl/current/META.yml (original)
+++ branches/upstream/libuniversal-can-perl/current/META.yml Fri Jan 15 02:18:29 2010
@@ -1,23 +1,25 @@
 ---
 name: UNIVERSAL-can
-version: 1.15
+version: 1.16
 author:
   - 'chromatic <chromatic at wgz.org>'
 abstract: Hack around people calling UNIVERSAL::can() as a function
 license: perl
 resources:
   license: http://dev.perl.org/licenses/
+build_requires:
+  Test::Simple: 0.60
 requires:
   Scalar::Util: ''
   Test::Simple: 0.60
-  perl: 5.6.2
-build_requires:
-  Test::Simple: 0.60
+  perl: v5.6.2
+configure_requires:
+  Module::Build: 0.35
 provides:
   UNIVERSAL::can:
     file: lib/UNIVERSAL/can.pm
-    version: 1.15
-generated_by: Module::Build version 0.33
+    version: 1.16
+generated_by: Module::Build version 0.35
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
   version: 1.4

Modified: branches/upstream/libuniversal-can-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libuniversal-can-perl/current/README?rev=50979&op=diff
==============================================================================
--- branches/upstream/libuniversal-can-perl/current/README (original)
+++ branches/upstream/libuniversal-can-perl/current/README Fri Jan 15 02:18:29 2010
@@ -1,7 +1,8 @@
 UNIVERSAL::can
 --------------
 
-Version 1.15, Mon Jun 22 20:36:50 UTC 2009
+Version 1.16, Thu Jan 14 22:54:46 UTC 2010
+
 
 This module attempts to work around people calling UNIVERSAL::can() as a
 function, which it is not.
@@ -19,4 +20,4 @@
 
 COPYRIGHT AND LICENCE
 
-    Artistic License 2.0, Copyright (c) chromatic 2005 - 2009.
+    Artistic License 2.0, Copyright (c) chromatic 2005 - 2010.

Modified: branches/upstream/libuniversal-can-perl/current/lib/UNIVERSAL/can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libuniversal-can-perl/current/lib/UNIVERSAL/can.pm?rev=50979&op=diff
==============================================================================
--- branches/upstream/libuniversal-can-perl/current/lib/UNIVERSAL/can.pm (original)
+++ branches/upstream/libuniversal-can-perl/current/lib/UNIVERSAL/can.pm Fri Jan 15 02:18:29 2010
@@ -4,7 +4,7 @@
 use warnings;
 
 use vars qw( $VERSION $recursing );
-$VERSION = '1.15';
+$VERSION = '1.16';
 
 use Scalar::Util 'blessed';
 use warnings::register;
@@ -40,7 +40,7 @@
     goto &$orig if $recursing
                 || (   defined $caller
                    &&  defined $_[0]
-                   &&  eval { $caller->isa( $_[0] ); } );
+                   &&  eval { local $recursing = 1; $caller->isa($_[0]) } );
 
     # call an overridden can() if it exists
     my $can = eval { $_[0]->$orig('can') || 0 };
@@ -80,7 +80,7 @@
 
 =head1 VERSION
 
-Version 1.14
+Version 1.16
 
 =head1 SYNOPSIS
 
@@ -141,12 +141,14 @@
 Peter du Marchie van Voorthuysen identified and fixed a problem with calling
 C<SUPER::can>.
 
+Daniel LeWarne found and fixed a deep recursion error.
+
 The Perl QA list had a huge... discussion... which inspired my realization that
 this module needed to do what it does now.
 
 =head1 COPYRIGHT & LICENSE
 
-Artistic License 2.0, copyright (c) 2005 - 2009 chromatic. Some rights
+Artistic License 2.0, copyright (c) 2005 - 2010 chromatic. Some rights
 reserved.
 
 =cut

Added: branches/upstream/libuniversal-can-perl/current/t/deep-recursion.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libuniversal-can-perl/current/t/deep-recursion.t?rev=50979&op=file
==============================================================================
--- branches/upstream/libuniversal-can-perl/current/t/deep-recursion.t (added)
+++ branches/upstream/libuniversal-can-perl/current/t/deep-recursion.t Fri Jan 15 02:18:29 2010
@@ -1,0 +1,25 @@
+#! perl
+
+# tests from RT #49580, where calling ->isa() may recurse into ->can()
+package Test::Overloaded::String;
+
+use strict;
+use warnings;
+use overload '""' => sub { $_[0]->can('bar') };
+
+sub new { bless {}, shift }
+
+sub bar {1}
+
+1;
+
+package main;
+
+use strict;
+use warnings;
+use Test::More tests => 1;
+use UNIVERSAL::can;
+
+my $foo = Test::Overloaded::String->new;
+
+ok( "$foo",  "Didn't segfault" );




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