If replace_constructor is true we do not check whether the constructor
Dave Rolsky [Thu, 4 Dec 2008 21:21:31 +0000 (21:21 +0000)]
can be inlined.

lib/Class/MOP/Immutable.pm

index 47e1bac..542c850 100644 (file)
@@ -156,7 +156,7 @@ sub _inline_constructor {
     );
 
     $metaclass->add_method( $options->{constructor_name} => $constructor )
-        if $constructor->can_be_inlined;
+        if $options->{replace_constructor} or $constructor->can_be_inlined;
 }
 
 sub _inline_destructor {