From: Dave Rolsky Date: Tue, 21 Sep 2010 18:41:33 +0000 (-0500) Subject: Move even more code up to parent X-Git-Tag: 1.15~120 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8044d617b558b27881c03f4cdaee0bd25f33b435;p=gitmo%2FMoose.git Move even more code up to parent --- diff --git a/lib/Moose/Meta/Method/Accessor/Native/String/Writer.pm b/lib/Moose/Meta/Method/Accessor/Native/String/Writer.pm index 16b21a2..b8583bc 100644 --- a/lib/Moose/Meta/Method/Accessor/Native/String/Writer.pm +++ b/lib/Moose/Meta/Method/Accessor/Native/String/Writer.pm @@ -11,15 +11,6 @@ use base 'Moose::Meta::Method::Accessor::Native::Writer'; sub _new_value {'$_[0]'} -sub _inline_tc_code { - my ( $self, $new_value, $potential_value ) = @_; - - return q{} unless $self->_constraint_must_be_checked; - - return $self->_inline_check_coercion($potential_value) . "\n" - . $self->_inline_check_constraint($potential_value); -} - sub _constraint_must_be_checked { my $self = shift; diff --git a/lib/Moose/Meta/Method/Accessor/Native/Writer.pm b/lib/Moose/Meta/Method/Accessor/Native/Writer.pm index 8a45327..1d124ec 100644 --- a/lib/Moose/Meta/Method/Accessor/Native/Writer.pm +++ b/lib/Moose/Meta/Method/Accessor/Native/Writer.pm @@ -91,7 +91,12 @@ sub _inline_copy_value { } sub _inline_tc_code { - die '_inline_tc_code must be overridden by ' . ref $_[0]; + my ( $self, $new_value, $potential_value ) = @_; + + return q{} unless $self->_constraint_must_be_checked; + + return $self->_inline_check_coercion($potential_value) . "\n" + . $self->_inline_check_constraint($potential_value); } sub _inline_check_coercion {