bump version to 0.68
[gitmo/Moose.git] / lib / Moose / Meta / Method.pm
index 8013f76..a9fd8bb 100644 (file)
@@ -3,15 +3,15 @@ package Moose::Meta::Method;
 use strict;
 use warnings;
 
-our $VERSION   = '0.50';
+our $VERSION   = '0.68';
+$VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
 use base 'Class::MOP::Method';
 
 sub _error_thrower {
     my $self = shift;
-    return "Moose::Meta::Class";
-    #( $self->associated_attribute || $self->associated_class ) # FIXME move to Accessor, fix for Constructor
+    ( ref $self && $self->associated_metaclass ) || "Moose::Meta::Class";
 }
 
 sub throw_error {
@@ -20,7 +20,8 @@ sub throw_error {
     unshift @_, "message" if @_ % 2 == 1;
     unshift @_, method => $self if ref $self;
     unshift @_, $inv;
-    goto $inv->can("throw_error"); # to avoid incrementing depth by 1
+    my $handler = $inv->can("throw_error");
+    goto $handler; # to avoid incrementing depth by 1
 }
 
 sub _inline_throw_error {
@@ -66,7 +67,7 @@ Stevan Little E<lt>stevan@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2009 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>