X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FSingleton%2FMeta%2FMethod%2FConstructor.pm;h=be99947061f8c78c615cedc639c1fb107161d0c0;hb=0a14785c68b278ebd1c4ce8f9538881fa6814040;hp=4c866e9e56be6d00f929cb0171935faf223d823e;hpb=2b4ce4bdb3bda617f7d2a966609c38ceb790d66e;p=gitmo%2FMooseX-Singleton.git diff --git a/lib/MooseX/Singleton/Meta/Method/Constructor.pm b/lib/MooseX/Singleton/Meta/Method/Constructor.pm index 4c866e9..be99947 100644 --- a/lib/MooseX/Singleton/Meta/Method/Constructor.pm +++ b/lib/MooseX/Singleton/Meta/Method/Constructor.pm @@ -4,7 +4,7 @@ use Moose; extends 'Moose::Meta::Method::Constructor'; -sub intialize_body { +sub initialize_body { my $self = shift; # TODO: # the %options should also include a both @@ -30,6 +30,7 @@ sub intialize_body { $self->_generate_slot_initializer($_) } 0 .. (@{$self->attributes} - 1)); + $source .= ";\n" . $self->_generate_triggers(); $source .= ";\n" . $self->_generate_BUILDALL(); $source .= ";\n" . 'return ${$existing} = $instance';