Workaround older perl's bug that caused segv by releasing CVs
[gitmo/Mouse.git] / lib / Mouse / Meta / Class.pm
index 476d8bf..24a2216 100644 (file)
@@ -377,6 +377,12 @@ sub _install_modifier {
         };
     }
 
+    # workaround older Perl's bug that caused segv :(
+    {
+        no warnings 'once';
+        our $__not_used = \&_install_modifier; # keep the CV not to be released
+    }
+
     # replace this method itself :)
     {
         no warnings 'redefine';