Replicate triggers fix from Moose.pm (gah, this immutable stuff is
Dave Rolsky [Sat, 24 May 2008 16:26:29 +0000 (16:26 +0000)]
gross)

lib/MooseX/Singleton/Meta/Method/Constructor.pm

index 4c866e9..b4dbc25 100644 (file)
@@ -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';