$class->throw_error("You can not use lazy_build and default for the same attribute ($name)", data => $options)
if exists $options->{default};
$options->{lazy} = 1;
- $options->{required} = 1;
$options->{builder} ||= "_build_${name}";
if ($name =~ /^_/) {
$options->{clearer} ||= "_clear${name}";
my $_foo_attr = $meta->get_attribute("_foo");
ok($foo_attr->is_lazy, "foo is lazy");
- ok($foo_attr->is_required, "foo is required");
ok($foo_attr->is_lazy_build, "foo is lazy_build");
ok($foo_attr->has_clearer, "foo has clearer");