From: Dave Rolsky Date: Tue, 21 Sep 2010 18:40:44 +0000 (-0500) Subject: Move more code up to the Native/Writer class X-Git-Tag: 1.15~121 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c302c35a88b18797d570bd801da9f05d12eb2192;p=gitmo%2FMoose.git Move more code up to the Native/Writer class --- diff --git a/lib/Moose/Meta/Method/Accessor/Native/String/Writer.pm b/lib/Moose/Meta/Method/Accessor/Native/String/Writer.pm index d75af68..16b21a2 100644 --- a/lib/Moose/Meta/Method/Accessor/Native/String/Writer.pm +++ b/lib/Moose/Meta/Method/Accessor/Native/String/Writer.pm @@ -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 ) = @_; diff --git a/lib/Moose/Meta/Method/Accessor/Native/Writer.pm b/lib/Moose/Meta/Method/Accessor/Native/Writer.pm index 09db4bf..8a45327 100644 --- a/lib/Moose/Meta/Method/Accessor/Native/Writer.pm +++ b/lib/Moose/Meta/Method/Accessor/Native/Writer.pm @@ -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 ) = @_;