From: Dave Rolsky Date: Sat, 24 May 2008 16:26:29 +0000 (+0000) Subject: Replicate triggers fix from Moose.pm (gah, this immutable stuff is X-Git-Tag: 0.09_02~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a06ef25ab7f693383a90c8e0821a7ecc37d7ae5d;p=gitmo%2FMooseX-Singleton.git Replicate triggers fix from Moose.pm (gah, this immutable stuff is gross) --- diff --git a/lib/MooseX/Singleton/Meta/Method/Constructor.pm b/lib/MooseX/Singleton/Meta/Method/Constructor.pm index 4c866e9..b4dbc25 100644 --- a/lib/MooseX/Singleton/Meta/Method/Constructor.pm +++ b/lib/MooseX/Singleton/Meta/Method/Constructor.pm @@ -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';