Showing 2 changed files with 4 additions and 5 deletions
+3 -4
lib/DBIx/Custom.pm
... ...
@@ -844,9 +844,8 @@ sub new {
844 844
         'insert_param' => \&DBIx::Custom::Tag::insert_param,
845 845
         'update_param' => \&DBIx::Custom::Tag::update_param
846 846
     };
847
-    
848
-    # DEPRECATED!
849
-    $self->{tag_parse} = 1;
847
+    $self->{tag_parse} = 1 unless exists $self->{tag_parse};
848
+    $self->{cache} = 0 unless exists $self->{cache};
850 849
     
851 850
     return $self;
852 851
 }
... ...
@@ -1226,7 +1225,7 @@ sub _create_query {
1226 1225
     my ($self, $source, $after_build_sql) = @_;
1227 1226
     
1228 1227
     # Cache
1229
-    my $cache = $self->cache;
1228
+    my $cache = $self->{cache};
1230 1229
     
1231 1230
     # Query
1232 1231
     my $query;
+1 -1
lib/DBIx/Custom/Where.pm
... ...
@@ -93,7 +93,7 @@ sub _parse {
93 93
         my $c = $self->{_safety_character};
94 94
         
95 95
         my $column;
96
-        if ($self->{_tag_parse} && $clause =~ /(\s|^)\{/) {
96
+        if ($self->{_tag_parse} && ($clause =~ /\s\{/ || $clause =~ /^\{/)) {
97 97
             my $columns = $self->dbi->query_builder->build_query($clause)->{columns};
98 98
             $column = $columns->[0];
99 99
         }