From: Fuji, Goro Date: Mon, 27 Sep 2010 12:55:19 +0000 (+0900) Subject: Fix a cache data name in method delegation X-Git-Tag: 0.76~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=73468dacfcea5f81cafa24fd3bea5a1987457238;p=gitmo%2FMouse.git Fix a cache data name in method delegation --- diff --git a/lib/Mouse/Meta/Method/Delegation.pm b/lib/Mouse/Meta/Method/Delegation.pm index 12afde2..2921fc5 100644 --- a/lib/Mouse/Meta/Method/Delegation.pm +++ b/lib/Mouse/Meta/Method/Delegation.pm @@ -13,12 +13,11 @@ sub _generate_delegation{ # If it has a reader, we must use it to make method modifiers work my $reader = $attr->get_read_method() || $attr->get_read_method_ref(); - my $can_be_optimized = $attr->{_method_delegation_can_be_optimized}; + my $can_be_optimized = $attr->{_mouse_cache_method_delegation_can_be_optimized}; if(!defined $can_be_optimized){ my $tc = $attr->type_constraint; - - $attr->{_method_delegation_can_be_optimized} = + $attr->{_mouse_cache_method_delegation_can_be_optimized} = (defined($tc) && $tc->is_a_type_of('Object')) && ($attr->is_required || $attr->has_default || $attr->has_builder) && ($attr->is_lazy || !$attr->has_clearer);