6 use Test::More tests => 6;
13 around new => sub { my $o = shift; $around_new = 1; $o->(@_); };
14 has 'foo' => (is => 'rw', isa => 'Int');
19 Bar->meta->make_immutable;
22 my $orig_new = Foo->meta->find_method_by_name('new');
23 isa_ok($orig_new, 'Class::MOP::Method::Wrapped');
24 $orig_new = $orig_new->get_original_method;
25 isa_ok($orig_new, 'Moose::Meta::Method');
27 Foo->meta->make_immutable(debug => 0);
28 my $inlined_new = Foo->meta->find_method_by_name('new');
29 isa_ok($inlined_new, 'Class::MOP::Method::Wrapped');
30 $inlined_new = $inlined_new->get_original_method;
34 local $TODO = 'but it isa Moose::Meta::Method instead';
35 isa_ok($inlined_new, 'Moose::Meta::Method::Constructor');
39 ok($around_new, 'around new called');
46 local $TODO = 'but it is not called';
47 ok($around_new, 'around new called');