X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FMethod%2FAccessor.pm;h=b6852f7df5601af5cbcbfaa56c68c6f892616a63;hb=82750a8aa67b0f6cd139537bef64162d7a7c4d52;hp=718313e61fc6733a1070eb9704b419d068affeba;hpb=e606ae5f848070d889472329819c95f5ba763ca3;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Method/Accessor.pm b/lib/Moose/Meta/Method/Accessor.pm index 718313e..b6852f7 100644 --- a/lib/Moose/Meta/Method/Accessor.pm +++ b/lib/Moose/Meta/Method/Accessor.pm @@ -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 ) )";