From: David Kamholz Date: Thu, 9 Mar 2006 15:40:43 +0000 (+0000) Subject: fix a couple stray regexen X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=37f235890c1bbe025eb3b09ff484b65319aa343e;p=dbsrgits%2FDBIx-Class-Historic.git fix a couple stray regexen --- diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index 5c93cd8..1f6863a 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -570,7 +570,7 @@ sub resolve_prefetch { my $rel_info = $self->relationship_info( $pre ); $self->throw_exception( $self->name . " has no such relationship '$pre'" ) unless $rel_info; - my $as_prefix = ($alias =~ /^.*?\.(.*)$/ ? $1.'.' : ''); + my $as_prefix = ($alias =~ /^.*?\.(.+)$/ ? $1.'.' : ''); my $rel_source = $self->related_source($pre); if (exists $rel_info->{attrs}{accessor} @@ -578,7 +578,7 @@ sub resolve_prefetch { $self->throw_exception( "Can't prefetch has_many ${pre} (join cond too complex)") unless ref($rel_info->{cond}) eq 'HASH'; - my @key = map { (/^foreign\.(.*)$/ ? ($1) : ()); } + my @key = map { (/^foreign\.(.+)$/ ? ($1) : ()); } keys %{$rel_info->{cond}}; $collapse->{"${as_prefix}${pre}"} = \@key; my @ord = (ref($rel_info->{attrs}{order_by}) eq 'ARRAY'