Move even more code up to parent
Dave Rolsky [Tue, 21 Sep 2010 18:41:33 +0000 (13:41 -0500)]
lib/Moose/Meta/Method/Accessor/Native/String/Writer.pm
lib/Moose/Meta/Method/Accessor/Native/Writer.pm

index 16b21a2..b8583bc 100644 (file)
@@ -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;
 
index 8a45327..1d124ec 100644 (file)
@@ -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 {