From: Stevan Little Date: Sat, 16 Feb 2008 20:09:57 +0000 (+0000) Subject: fixing delegation X-Git-Tag: 0_55~302 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=140001f0aad2a8beb87f05749f7eac1df4d3570c;p=gitmo%2FMoose.git fixing delegation --- diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index 835905a..b7436cc 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -437,6 +437,16 @@ sub install_accessors { $associated_class->add_method($handle => subname $name, $method_to_call); } else { + # NOTE: + # we used to do a goto here, but the + # goto didn't handle failure correctly + # (it just returned nothing), so I took + # that out. However, the more I thought + # about it, the less I liked it doing + # the goto, and I prefered the act of + # delegation being actually represented + # in the stack trace. + # - SL $associated_class->add_method($handle => subname $name, sub { my $proxy = (shift)->$accessor(); (defined $proxy)