2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
16 our $foo_default_called = 0;
21 default => sub { $foo_default_called++; 'foo' },
24 our $bar_default_called = 0;
30 default => sub { $bar_default_called++; 'bar' },
33 __PACKAGE__->meta->make_immutable;
38 is($Foo::foo_default_called, 1, "foo default was only called once during constructor");
42 is($Foo::bar_default_called, 1, "bar default was only called once when lazy attribute is accessed");