$val = $self->default($instance);
}
- if (defined $val) {
+ if (defined $val || $self->has_default) {
if ($self->has_type_constraint) {
my $type_constraint = $self->type_constraint;
if ($self->should_coerce && $type_constraint->has_coercion) {
$self->name .
") does not pass the type constraint (" .
$type_constraint->name .
- ") with '$val'";
+ ") with '" . (defined $val ? $val : 'undef') . "'";
}
}