X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FMethod%2FAccessor%2FNative%2FCounter%2FWriter.pm;h=2df502c3b570c8bcb3a307e7debe265c73a35330;hb=f0b2e5673e864903e74a429565d0c57b69a60b95;hp=090ec8d661fc24b3ce54d4e6c4771ababf012283;hpb=44babf1f66a06b9e1a70a0f04841439e4bc71a6a;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Method/Accessor/Native/Counter/Writer.pm b/lib/Moose/Meta/Method/Accessor/Native/Counter/Writer.pm index 090ec8d..2df502c 100644 --- a/lib/Moose/Meta/Method/Accessor/Native/Counter/Writer.pm +++ b/lib/Moose/Meta/Method/Accessor/Native/Counter/Writer.pm @@ -3,11 +3,13 @@ package Moose::Meta::Method::Accessor::Native::Counter::Writer; use strict; use warnings; -our $VERSION = '1.13'; +our $VERSION = '1.19'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; -use base 'Moose::Meta::Method::Accessor::Native::Writer'; +use Moose::Role; + +with 'Moose::Meta::Method::Accessor::Native::Writer'; sub _constraint_must_be_checked { my $self = shift; @@ -19,17 +21,6 @@ sub _constraint_must_be_checked { || ( $attr->should_coerce && $attr->type_constraint->has_coercion ) ); } -sub _inline_check_coercion { - my ( $self, $value ) = @_; - - my $attr = $self->associated_attribute; - - return '' - unless $attr->should_coerce && $attr->type_constraint->has_coercion; - - # We want to break the aliasing in @_ in case the coercion tries to make a - # destructive change to an array member. - return "$value = $attr->type_constraint->coerce($value);"; -} +no Moose::Role; 1;