bump version to 0.25
[gitmo/MooseX-Singleton.git] / lib / MooseX / Singleton / Role / Meta / Method / Constructor.pm
index c557db7..63c2888 100644 (file)
@@ -1,7 +1,7 @@
 package MooseX::Singleton::Role::Meta::Method::Constructor;
 use Moose::Role;
 
-our $VERSION = '0.23';
+our $VERSION = '0.25';
 $VERSION = eval $VERSION;
 
 override _initialize_body => sub {
@@ -48,11 +48,14 @@ override _initialize_body => sub {
         = map { defined $_ ? $_->_compiled_type_constraint : undef; }
         @type_constraints;
 
+    my $defaults = [map { $_->default } @$attrs];
+
     my ( $code, $e ) = $self->_compile_code(
         code        => $source,
         environment => {
             '$meta'                   => \$self,
             '$attrs'                  => \$attrs,
+            '$defaults'               => \$defaults,
             '@type_constraints'       => \@type_constraints,
             '@type_constraint_bodies' => \@type_constraint_bodies,
         },