[Catalyst-commits] r8333 -
CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/lib/CatalystX/CRUD/ModelAdapter
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Tue Sep 2 16:49:10 BST 2008
Author: karpet
Date: 2008-09-02 16:49:10 +0100 (Tue, 02 Sep 2008)
New Revision: 8333
Modified:
CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/lib/CatalystX/CRUD/ModelAdapter/DBIC.pm
Log:
quiet some warnings
Modified: CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/lib/CatalystX/CRUD/ModelAdapter/DBIC.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/lib/CatalystX/CRUD/ModelAdapter/DBIC.pm 2008-09-02 15:44:17 UTC (rev 8332)
+++ CatalystX-CRUD/CatalystX-CRUD-ModelAdapter-DBIC/trunk/lib/CatalystX/CRUD/ModelAdapter/DBIC.pm 2008-09-02 15:49:10 UTC (rev 8333)
@@ -273,12 +273,15 @@
my $q = $self->next::method($field_names);
- if ( $q->{query}->[0] eq 'or' ) {
- $q->{query}->[0] = '-or';
- }
+ #carp "make_sql_query : " . dump $q;
- if ( $q->{query}->[0] eq 'and' ) {
- $q->{query}->[0] = '-and';
+ if ( defined $q->{query}->[0] ) {
+ if ( $q->{query}->[0] eq 'or' ) {
+ $q->{query}->[0] = '-or';
+ }
+ elsif ( $q->{query}->[0] eq 'and' ) {
+ $q->{query}->[0] = '-and';
+ }
}
#carp "make_sql_query : " . dump $q;
More information about the Catalyst-commits
mailing list