Fix warnings in upcoming moose
Tomas Doran [Thu, 10 Sep 2009 00:13:56 +0000 (00:13 +0000)]
Changes
lib/Catalyst.pm

diff --git a/Changes b/Changes
index 88ad125..bba5e3b 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,13 @@
 # This file documents the revision history for Perl extension Catalyst.
 #
+
+    - Add allow_mutable_ancestors option when force inlining a constructor onto
+      applications with plugins defining their own (usually Class::Accessor::Fast)
+      new methods, to avoid warnings generated by upcoming Moose releases
+      as we can make a class (MyApp) immutable when not all of it's superclasses
+      (e.g. plugins not fully Moose converted, but using
+       MooseX::Emulate::Class::Accessor::Fast) are not immutable.
+
 5.80012 2009-09-09 19:09:09
 
   Bug fixes:
index 222e361..44dd8e6 100644 (file)
@@ -1134,8 +1134,10 @@ EOF
                 . "Class::Accessor(::Fast)?\nPlease pass "
                 . "(replace_constructor => 1)\nwhen making your class immutable.\n";
         }
-        $meta->make_immutable(replace_constructor => 1)
-            unless $meta->is_immutable;
+        $meta->make_immutable(
+            replace_constructor => 1,
+            allow_mutable_ancestors => 1,
+        ) unless $meta->is_immutable;
     };
 
     $class->setup_finalize;