From: Michael G Schwern Date: Fri, 14 Mar 2008 03:17:12 +0000 (+0000) Subject: Reorder the accessor_name_for() check to get the more likely one first to X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2d8ced3984d471f9e735619faeba3c55bd9867fa;p=dbsrgits%2FDBIx-Class-Historic.git Reorder the accessor_name_for() check to get the more likely one first to squeeze a little performance out maybe. --- diff --git a/lib/DBIx/Class/CDBICompat/AccessorMapping.pm b/lib/DBIx/Class/CDBICompat/AccessorMapping.pm index 1792a13..8beaae6 100644 --- a/lib/DBIx/Class/CDBICompat/AccessorMapping.pm +++ b/lib/DBIx/Class/CDBICompat/AccessorMapping.pm @@ -30,12 +30,12 @@ sub mk_group_accessors { # that we should support both. CDBI does. sub _can_accessor_name_for { my $class = shift; - return $class->can("accessor_name") || $class->can("accessor_name_for"); + return $class->can("accessor_name_for") || $class->can("accessor_name"); } sub _can_mutator_name_for { my $class = shift; - return $class->can("mutator_name") || $class->can("mutator_name_for"); + return $class->can("mutator_name_for") || $class->can("mutator_name"); } sub _try_accessor_name_for {