]> git.decadent.org.uk Git - maypole.git/commitdiff
CDBI's ->search should be callable from everywhere.
authorSimon Cozens <simon@simon-cozens.org>
Tue, 24 Feb 2004 06:38:03 +0000 (06:38 +0000)
committerSimon Cozens <simon@simon-cozens.org>
Tue, 24 Feb 2004 06:38:03 +0000 (06:38 +0000)
git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@70 48953598-375a-da11-a14b-00016c27c3ee

lib/Maypole/Model/CDBI.pm

index 74653dc6f2d091a4a3638713d8e5c2bfce397def..c7621d2c493491c33415dd7f021940395687e13d 100644 (file)
@@ -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