From 648cdcaffc857aa90acee36c6c2412c2dbfb3c9f Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Sat, 31 Jan 2004 19:06:03 +0000 Subject: [PATCH] Slighty naughty bug there. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@39 48953598-375a-da11-a14b-00016c27c3ee --- lib/Apache/MVC/Model/CDBI.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Apache/MVC/Model/CDBI.pm b/lib/Apache/MVC/Model/CDBI.pm index 8d75c30..d842d5f 100644 --- a/lib/Apache/MVC/Model/CDBI.pm +++ b/lib/Apache/MVC/Model/CDBI.pm @@ -59,8 +59,7 @@ sub search :Exported { my $oper = "like"; # For now use Carp; Carp::confess("Urgh") unless ref $r; my %params = %{$r->{params}}; - my %values = map { $_ => {$oper, $oper eq "like" ? "%".$params{$_}."%" - :$params{$_} } } + my %values = map { $_ => {$oper, $params{$_} } } grep { $params{$_} and $fields{$_} } keys %params; $r->objects([ %values ? $self->search_where(%values) : $self->retrieve_all ]); -- 2.39.5