allow forcing of constructor inlining
[gitmo/Class-MOP.git] / lib / Class / MOP / Immutable.pm
index 09ed6a5..2318346 100644 (file)
@@ -127,7 +127,7 @@ sub make_metaclass_immutable {
                 package_name => $metaclass->name,
                 name         => $options{constructor_name}
             )
-        ) unless $metaclass->has_method($options{constructor_name});
+        ) if $options{replace_constructor} or !$metaclass->has_method($options{constructor_name});
     }
 
     if ($options{inline_destructor}) {