6 use Test::More tests => 2;
14 our $foo_default_called = 0;
19 default => sub { $foo_default_called++; 'foo' },
22 our $bar_default_called = 0;
28 default => sub { $bar_default_called++; 'bar' },
31 __PACKAGE__->meta->make_immutable;
36 is($Foo::foo_default_called, 1, "foo default was only called once during constructor");
40 is($Foo::bar_default_called, 1, "bar default was only called once when lazy attribute is accessed");