Showing 3 changed files with 4 additions and 4 deletions
+1 -1
lib/DBIx/Custom.pm
... ...
@@ -326,7 +326,7 @@ sub execute {
326 326
     $self->last_sql($query->sql);
327 327
 
328 328
     return $query if $query_return;
329
-    $filter ||= $query->filter;
329
+    $filter ||= $query->{filter} || {};
330 330
     
331 331
     # Tables
332 332
     unshift @$tables, @{$query->{tables} || []};
+2 -2
lib/DBIx/Custom/Query.pm
... ...
@@ -33,7 +33,7 @@ sub tables {
33 33
 
34 34
 #DEPRECATED!
35 35
 sub filter {
36
-    #warn "DBIx::Custom::Query filter method is DEPRECATED!";
36
+    Carp::carp "DBIx::Custom::Query filter method is DEPRECATED!";
37 37
     my $self = shift;
38 38
     if (@_) {
39 39
         my $filter = {};
... ...
@@ -67,7 +67,7 @@ sub filter {
67 67
                 $filter->{$column} = $filters->{$fname};
68 68
             }
69 69
         }
70
-        $self->{filter} = {%{$self->filter}, %$filter};
70
+        $self->{filter} = {%{$self->{filter} || {}}, %$filter};
71 71
         return $self;
72 72
     }
73 73
     return $self->{filter} ||= {};
+1 -1
t/dbix-custom-core-sqlite.t
... ...
@@ -6,7 +6,7 @@ use utf8;
6 6
 use Encode qw/encode_utf8 decode_utf8/;
7 7
 use Data::Dumper;
8 8
 
9
-#$SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /DEPRECATED/};
9
+$SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /DEPRECATED/};
10 10
 
11 11
 BEGIN {
12 12
     eval { require DBD::SQLite; 1 }