use Modern::Perl; package Testing; use Bit::Vector; use Moose; has 'thing' => ( isa => 'Bit::Vector', is => 'rw', default => sub { return Bit::Vector->new(32); }, ); no Moose; __PACKAGE__->meta->make_immutable; 1; #### use Modern::Perl; use Testing; use Data::Dump qw/dump/; my $object = Testing->new; say dump($object); #### bless({ thing => bless(do{\(my $o = 39557684)}, "Bit::Vector") }, "Testing") #### my $object = Testing->new({thing => undef});