bump version and update changes.
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor.pm
index 718313e..b6852f7 100644 (file)
@@ -4,14 +4,17 @@ package Moose::Meta::Method::Accessor;
 use strict;
 use warnings;
 
-our $VERSION   = '0.57';
+our $VERSION   = '0.62_01';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
 use base 'Moose::Meta::Method',
          'Class::MOP::Method::Accessor';
 
-## Inline method generators
+sub _error_thrower {
+    my $self = shift;
+    ( ref $self && $self->associated_attribute ) || $self->SUPER::_error_thrower();
+}
 
 sub _eval_code {
     my ( $self, $code ) = @_;
@@ -272,7 +275,7 @@ sub _inline_auto_deref {
         $sigil = '%';
     }
     else {
-        $self->throw_error("Can not auto de-reference the type constraint '" . $type_constraint->name . "'", data => $type_constraint );
+        $self->throw_error("Can not auto de-reference the type constraint '" . $type_constraint->name . "'", type_constraint => $type_constraint );
     }
 
     "(wantarray() ? $sigil\{ ( $ref_value ) || return } : ( $ref_value ) )";