6 use Test::More 'no_plan';
8 # if make_immutable is removed from the following code the tests pass
14 has foo => ( is => "ro" );
23 my ( $self, @args ) = @_;
24 $self->$next( foo => 42 );
39 my @classes = qw(Foo Bar Gorch Zoink);
43 is( Foo->new->foo, undef, "base class (" . (Foo->meta->is_immutable ? "immutable" : "mutable") . ")" );
44 is( Bar->new->foo, 42, "around new called on Bar->new (" . (Bar->meta->is_immutable ? "immutable" : "mutable") . ")" );
45 local $TODO = 'these tests fail once Gorch is immutable' if Gorch->meta->is_immutable;
46 is( Gorch->new->foo, 42, "around new called on Gorch->new (" . (Gorch->meta->is_immutable ? "immutable" : "mutable") . ")" );
47 is( Zoink->new->foo, 42, "around new called Zoink->new (" . (Zoink->meta->is_immutable ? "immutable" : "mutable") . ")" );
51 ( shift @classes )->meta->make_immutable;