Use dzil Authority plugin - remove $AUTHORITY from code
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Counter / Writer.pm
CommitLineData
04e05413 1package Moose::Meta::Method::Accessor::Native::Counter::Writer;
2
3use strict;
4use warnings;
5
8b9641b8 6use Moose::Role;
7
8with 'Moose::Meta::Method::Accessor::Native::Writer';
04e05413 9
04e05413 10sub _constraint_must_be_checked {
11 my $self = shift;
12
13 my $attr = $self->associated_attribute;
14
15 return $attr->has_type_constraint
1e2c801e 16 && ($attr->type_constraint->name =~ /^(?:Num|Int)$/
17 || ($attr->should_coerce && $attr->type_constraint->has_coercion)
18 );
04e05413 19}
20
8b9641b8 21no Moose::Role;
04e05413 22
231;