push @triggers_queue, [ $attribute->trigger, $object->{$slot} ];
}
}
- elsif(!$is_cloning) { # no init arg, noop while cloning
+ else { # no init arg
if ($attribute->has_default || $attribute->has_builder) {
- if (!$attribute->is_lazy) {
+ if (!$attribute->is_lazy && !exists $object->{$slot}) {
my $default = $attribute->default;
my $builder = $attribute->builder;
my $value = $builder ? $object->$builder()
if ref($object->{$slot}) && $attribute->is_weak_ref;
}
}
- elsif($attribute->is_required) {
+ elsif(!$is_cloning && $attribute->is_required) {
$self->throw_error("Attribute (".$attribute->name.") is required");
}
}
=head1 VERSION
-This document describes Mouse version 0.54
+This document describes Mouse version 0.59
=head1 SEE ALSO