}
if ($should_deref) {
- my $type_constraint = $attribute->{type_constraint};
- if (ref($type_constraint) && $type_constraint->name eq 'ArrayRef') {
+ if (ref($constraint) && $constraint->name eq 'ArrayRef') {
$accessor .= 'if (wantarray) {
return @{ '.$self.'->{'.$key.'} || [] };
}';