$type_constraint->name .
") with '" .
(defined $val
- ? (blessed($val) && overload::Overloaded($val)
- ? overload::StrVal($val)
- : $val)
+ ? overload::StrVal($val)
: 'undef') .
"'";
}
. $type_constraint->name
. ") with "
. (defined($value)
- ? ("'" .
- (blessed($value) && overload::Overloaded($value)
- ? overload::StrVal($value)
- : $value)
- . "'")
+ ? ("'" . overload::StrVal($value) . "'")
: "undef")
if defined($value);
}
$type_constraint->(%s)
|| confess "Attribute (" . $attr_name . ") does not pass the type constraint ("
. $type_constraint_name . ") with "
- . (defined(%s) ? (Scalar::Util::blessed(%s) && overload::Overloaded(%s) ? overload::StrVal(%s) : %s) : "undef")
+ . (defined(%s) ? overload::StrVal(%s) : "undef")
if defined(%s);
EOF
}
$code .= ' $default = $type_constraint_obj->coerce($default);'."\n" if $attr->should_coerce;
$code .= ' ($type_constraint->($default))' .
' || confess "Attribute (" . $attr_name . ") does not pass the type constraint ("' .
- ' . $type_constraint_name . ") with " . (defined($default) ? (Scalar::Util::blessed($default) && overload::Overloaded($default) ? overload::StrVal($default) : $default) : "undef")' .
+ ' . $type_constraint_name . ") with " . (defined($default) ? overload::StrVal($default) : "undef")' .
' if defined($default);' . "\n" .
' ' . $slot_access . ' = $default; ' . "\n";
}
$type_constraint_cv . '->(' . $value_name . ')'
. "\n\t" . '|| confess "Attribute (' . $attr->name . ') does not pass the type constraint ('
. $attr->type_constraint->name
- . ') with " . (defined(' . $value_name . ') ? (Scalar::Util::blessed(' . $value_name . ') && overload::Overloaded(' . $value_name . ') ? overload::StrVal(' . $value_name . ') : ' . $value_name . ') : "undef");'
+ . ') with " . (defined(' . $value_name . ') ? overload::StrVal(' . $value_name . ') : "undef");'
);
}