From 1fc17a5c685deb2c7489c8e23a58240e7f3e47a4 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Tue, 24 Feb 2004 06:38:03 +0000 Subject: [PATCH] CDBI's ->search should be callable from everywhere. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@70 48953598-375a-da11-a14b-00016c27c3ee --- lib/Maypole/Model/CDBI.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Maypole/Model/CDBI.pm b/lib/Maypole/Model/CDBI.pm index 74653dc..c7621d2 100644 --- a/lib/Maypole/Model/CDBI.pm +++ b/lib/Maypole/Model/CDBI.pm @@ -71,7 +71,8 @@ sub adopt { } sub search :Exported { - return shift->SUPER::search(@_) if caller eq "Class::DBI"; # oops + return shift->SUPER::search(@_) if caller ne "Maypole::Model::Base"; + # A real CDBI search. my ($self, $r) = @_; my %fields = map {$_ => 1 } $self->columns; my $oper = "like"; # For now -- 2.39.5