Beginning of dzilization
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Collection.pm
index 2f9222d..1924f76 100644 (file)
@@ -3,8 +3,6 @@ package Moose::Meta::Method::Accessor::Native::Collection;
 use strict;
 use warnings;
 
-our $VERSION = '1.19';
-$VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
 use Moose::Role;
@@ -45,7 +43,7 @@ sub _tc_member_type {
     return;
 }
 
-sub _value_needs_copy {
+sub _writer_value_needs_copy {
     my $self = shift;
 
     return $self->_constraint_must_be_checked
@@ -54,7 +52,6 @@ sub _value_needs_copy {
 
 sub _inline_tc_code {
     my $self = shift;
-    my ($potential_value) = @_;
 
     return unless $self->_constraint_must_be_checked;
 
@@ -65,8 +62,8 @@ sub _inline_tc_code {
     }
     else {
         return (
-            $self->_inline_check_coercion($potential_value),
-            $self->_inline_check_constraint($potential_value),
+            $self->_inline_check_coercion(@_),
+            $self->_inline_check_constraint(@_),
         );
     }
 }
@@ -108,7 +105,7 @@ sub _inline_check_member_constraint {
                 $self->_inline_throw_error(
                     '"A new member value for ' . $attr_name
                   . ' does not pass its type constraint because: "'
-                  . ' . $member_tc->get_message($_)',
+                  . ' . $member_tc_obj->get_message($_)',
                     'data => $_',
                 ) . ';',
             '}',