no strict 'refs';
for my $klass ($meta->linearized_isa) {
if (*{ $klass . '::BUILD' }{CODE}) {
- push @code, qq{${klass}::BUILD->(\$instance, \$args);};
+ push @code, qq{${klass}::BUILD(\$instance, \$args);};
}
}
return join "\n", @code;
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More tests => 6;
use Test::Exception;
{
is => 'rw',
required => 1,
);
+ sub BUILD { main::ok "calling BUILD in HardDog" }
no Mouse;
__PACKAGE__->meta->make_immutable;
}
is => 'rw',
required => 1,
);
+ sub BUILD { main::ok "calling BUILD in SoftDog" }
no Mouse;
}