From: Simon Cozens Date: Tue, 24 Feb 2004 06:38:03 +0000 (+0000) Subject: CDBI's ->search should be callable from everywhere. X-Git-Tag: 2.10~292 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=1fc17a5c685deb2c7489c8e23a58240e7f3e47a4;hp=41171a7d875dee2febd61adc1d5094aa1f1b8076;p=maypole.git CDBI's ->search should be callable from everywhere. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@70 48953598-375a-da11-a14b-00016c27c3ee --- 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