From: gfx Date: Wed, 22 Jul 2009 00:53:59 +0000 (+0900) Subject: Change the algorithm to use XS accessors. Now "xs" acts as a kind of "inline". X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=89b5629647dcfa7a325101aa407715558b70ae14;p=gitmo%2FClass-MOP.git Change the algorithm to use XS accessors. Now "xs" acts as a kind of "inline". --- diff --git a/lib/Class/MOP/Method/Accessor.pm b/lib/Class/MOP/Method/Accessor.pm index 626fa83..0cad3b3 100644 --- a/lib/Class/MOP/Method/Accessor.pm +++ b/lib/Class/MOP/Method/Accessor.pm @@ -95,11 +95,8 @@ sub _initialize_body { 'method' ); - if($self->can_xs($method_name)){ - $method_name .= '_xs'; - } - elsif($self->is_inline){ - $method_name .= '_inline'; + if($self->is_inline){ + $method_name .= $self->can_xs($method_name) ? '_xs' : '_inline'; } $self->{'body'} = $self->$method_name();