Bump version to 1.9900 for new version numbering scheme
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Counter / Writer.pm
1 package Moose::Meta::Method::Accessor::Native::Counter::Writer;
2
3 use strict;
4 use warnings;
5
6 our $VERSION = '1.9900';
7 $VERSION = eval $VERSION;
8 our $AUTHORITY = 'cpan:STEVAN';
9
10 use Moose::Role;
11
12 with 'Moose::Meta::Method::Accessor::Native::Writer';
13
14 sub _constraint_must_be_checked {
15     my $self = shift;
16
17     my $attr = $self->associated_attribute;
18
19     return $attr->has_type_constraint
20         && ($attr->type_constraint->name =~ /^(?:Num|Int)$/
21          || ($attr->should_coerce && $attr->type_constraint->has_coercion)
22            );
23 }
24
25 no Moose::Role;
26
27 1;