- slight optimization to ident_condition in PK.pm
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / PK.pm
index ea22a21..9b9f8a4 100644 (file)
@@ -99,8 +99,8 @@ Produces a condition hash to locate a row based on the primary key(s).
 sub ident_condition {
   my ($self, $alias) = @_;
   my %cond;
-  $cond{(defined $alias ? "${alias}.$_" : $_)} = $self->get_column($_)
-    for $self->primary_columns;
+  my $prefix = defined $alias ? $alias.'.' : '';
+  $cond{$prefix.$_} = $self->get_column($_) for $self->primary_columns;
   return \%cond;
 }