1 package Moose::Meta::Method::Accessor::Native::Array;
7 use Scalar::Util qw( looks_like_number );
10 $VERSION = eval $VERSION;
11 our $AUTHORITY = 'cpan:STEVAN';
13 use base 'Moose::Meta::Method::Accessor::Native';
15 sub _inline_curried_arguments {
18 return q{} unless @{ $self->curried_arguments };
20 return "\@_ = ( \@curried, \@_ );";
23 sub _inline_check_constraint {
26 return q{} unless $self->_constraint_must_be_checked;
28 return $self->SUPER::_inline_check_constraint(@_);
31 sub _constraint_must_be_checked {
34 my $attr = $self->associated_attribute;
36 return $attr->has_type_constraint
37 && ( $attr->type_constraint->name ne 'ArrayRef'
38 || ( $attr->should_coerce && $attr->type_constraint->has_coercion ) );