Revision history for Perl extension Moose
0.23
+ * Moose::Meta::Method::Constructor
+ - fix inlined constructor for hierarchy with multiple BUILD methods (mst)
* Moose::Meta::Class
- Modify make_immutable to work with the new Class::MOP immutable
mechanism + POD + very basic test (groditi)
foreach my $method (reverse $self->associated_metaclass->find_all_methods_by_name('BUILD')) {
push @BUILD_calls => '$instance->' . $method->{class} . '::BUILD(\%params)';
}
- return join "\n" => @BUILD_calls;
+ return join ";\n" => @BUILD_calls;
}
sub _generate_slot_initializer {
use strict;
use warnings;
-use Test::More tests => 6;
+use Test::More tests => 8;
use Test::Exception;
BEGIN {
lives_ok{ $meta->add_role($foo_role) } "Add Role is unlocked";
}
+{
+ package Bar;
+
+ use Moose;
+
+ sub BUILD { 'bar' }
+}
+
+{
+ package Baz;
+
+ use Moose;
+
+ extends 'Bar';
+
+ sub BUILD { 'baz' }
+}
+
+lives_ok { Bar->meta->make_immutable }
+ 'Immutable meta with single BUILD';
+
+lives_ok { Baz->meta->make_immutable }
+ 'Immutable meta with multiple BUILDs';
+
=pod
Nothing here yet, but soon :)