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

index d75af68..16b21a2 100644 (file)
@@ -11,12 +11,6 @@ use base 'Moose::Meta::Method::Accessor::Native::Writer';
 
 sub _new_value {'$_[0]'}
 
-sub _value_needs_copy {
-    my $self = shift;
-
-    return $self->_constraint_must_be_checked;
-}
-
 sub _inline_tc_code {
     my ( $self, $new_value, $potential_value ) = @_;
 
index 09db4bf..8a45327 100644 (file)
@@ -72,7 +72,11 @@ sub _inline_process_arguments {q{}}
 
 sub _inline_check_arguments {q{}}
 
-sub _value_needs_copy {0}
+sub _value_needs_copy {
+    my $self = shift;
+
+    return $self->_constraint_must_be_checked;
+}
 
 sub _inline_copy_value {
     my ( $self, $potential_ref ) = @_;