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=deecce84c2f0d5f7c1a0817c7faf1bb6fa6683c1;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 8d313c9..de883de 100644 --- a/lib/Class/MOP/Method/Accessor.pm +++ b/lib/Class/MOP/Method/Accessor.pm @@ -84,11 +84,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();