[Bps-public-commit] r15835 - PerlIO-via-dynamic/trunk

clkao at bestpractical.com clkao at bestpractical.com
Mon Sep 8 07:21:28 EDT 2008


Author: clkao
Date: Mon Sep  8 07:21:26 2008
New Revision: 15835

Modified:
   PerlIO-via-dynamic/trunk/   (props changed)
   PerlIO-via-dynamic/trunk/CHANGES
   PerlIO-via-dynamic/trunk/Makefile.PL
   PerlIO-via-dynamic/trunk/dynamic.pm

Log:
 r411 at mtl:  clkao | 2008-05-31 17:17:50 +0800
 workaround a 5.10.0 refcnt bug.
 


Modified: PerlIO-via-dynamic/trunk/CHANGES
==============================================================================
--- PerlIO-via-dynamic/trunk/CHANGES	(original)
+++ PerlIO-via-dynamic/trunk/CHANGES	Mon Sep  8 07:21:26 2008
@@ -1,3 +1,7 @@
+[Changes for 0.13 - 31 May, 2008]
+
+* Workaround a refcnt bug in Perl 5.10.0
+
 [Changes for 0.12 - 6 Mar, 2006]
 
 * Dummy release, as I accidentally delete the previous

Modified: PerlIO-via-dynamic/trunk/Makefile.PL
==============================================================================
--- PerlIO-via-dynamic/trunk/Makefile.PL	(original)
+++ PerlIO-via-dynamic/trunk/Makefile.PL	Mon Sep  8 07:21:26 2008
@@ -8,6 +8,7 @@
 abstract_from	('dynamic.pm');
 license		('perl');
 version_from	('dynamic.pm');
+requires        ('Internals') if $] == 5.010000;
 
 include('ExtUtils::AutoInstall');
 auto_install();

Modified: PerlIO-via-dynamic/trunk/dynamic.pm
==============================================================================
--- PerlIO-via-dynamic/trunk/dynamic.pm	(original)
+++ PerlIO-via-dynamic/trunk/dynamic.pm	Mon Sep  8 07:21:26 2008
@@ -66,6 +66,12 @@
 	if $_[0] eq __PACKAGE__;
     my $p = bless gensym(), $_[0];
 
+    if ($] == 5.010000 && ref($_[-1]) eq 'GLOB') {
+        # This is to workaround a core bug in perl 5.10.0, see
+        # http://rt.perl.org/rt3/Public/Bug/Display.html?id=54934
+        require Internals;
+        Internals::SetRefCount($_[-1], Internals::GetRefCount($_[-1])+1);
+    }
     no strict 'refs';
     # make sure the blessed glob is destroyed
     # earlier than the object representing the namespace.



More information about the Bps-public-commit mailing list