From: Matt S Trout Date: Fri, 20 Jul 2012 17:14:56 +0000 (+0000) Subject: ensure constructor gets regenerated if forced early by metaclass inflation X-Git-Tag: v1.000001~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoo.git;a=commitdiff_plain;h=9f8d2cdb30f01c298ccc06606740587a0394735e ensure constructor gets regenerated if forced early by metaclass inflation --- diff --git a/Changes b/Changes index 34bd81d..ec47b24 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ + - ensure constructor gets regenerated if forced early by metaclass inflation + 1.000000 - 2012-07-18 - clean up doc language and expand on Moo and Moose - error prefixes for isa and coerce exceptions diff --git a/lib/Moo/HandleMoose.pm b/lib/Moo/HandleMoose.pm index fb68afd..e03e49c 100644 --- a/lib/Moo/HandleMoose.pm +++ b/lib/Moo/HandleMoose.pm @@ -23,6 +23,9 @@ sub maybe_reinject_fake_metaclass_for { my ($name) = @_; our %DID_INJECT; if (delete $DID_INJECT{$name}) { + unless ($Moo::Role::INFO{$name}) { + Moo->_constructor_maker_for($name)->install_delayed; + } inject_fake_metaclass_for($name); } }