[Dbix-class] [ANNOUNCE] DBIx::Class 0.08008

Bernhard Weißhuhn bkw at weisshuhn.de
Sun Nov 18 16:41:23 GMT 2007


Hi,

On Fri, Nov 16, 2007 at 02:34:34PM +0000, Ash Berlin <ash_cpan at firemirror.com> wrote:
 
> - Added startup checks to warn loudly if we appear to be running on
>   RedHat systems from perl-5.8.8-10 and up that have the bless/overload
>   patch applied (badly) which causes 2x -> 100x performance penalty.
>   (Jon Schutz)

I think we can do better on the check, please consider the attached
propsed patch.

It inhibits the warning on systems which have the upstream fix applied
(like fedora 7 since perl-5.8.8-19).

regards,
  bkw

P.S. The original file mixes tabs and spaces for indent, which I tried
     not to touch in order to keep the patch readable.
-------------- next part --------------
--- lib/DBIx/Class/StartupCheck.pm.orig	2007-11-18 17:19:57.000000000 +0100
+++ lib/DBIx/Class/StartupCheck.pm	2007-11-18 17:31:15.000000000 +0100
@@ -12,8 +12,14 @@
 	return !!$r2;
     }
 
+    sub _has_fix_28775 {
+	require B::Deparse;
+	return $B::Deparse::VERSION >= 0.71_01;
+    }
+
+
     sub _possibly_has_bad_overload_performance {
-	return $] < 5.008009 && ! _has_bug_34925();
+	return $] < 5.008009 && ! _has_bug_34925() && ! _has_fix_28775() ;
     }
 
     unless ($ENV{DBIC_NO_WARN_BAD_PERL}) {


More information about the DBIx-Class mailing list