... | ... |
@@ -1253,7 +1253,7 @@ sub _create_query { |
1253 | 1253 |
? $ENV{DBIX_CUSTOM_TAG_PARSE} : $self->{tag_parse}; |
1254 | 1254 |
|
1255 | 1255 |
my $sql = " " . $source || ''; |
1256 |
- if ($tag_parse && ($sql =~ /\s\{/ || $sql =~ /^\{/)) { |
|
1256 |
+ if ($tag_parse && ($sql =~ /\s\{/)) { |
|
1257 | 1257 |
$query = $self->query_builder->build_query($sql); |
1258 | 1258 |
} |
1259 | 1259 |
else { |
... | ... |
@@ -93,14 +93,14 @@ sub _parse { |
93 | 93 |
my $c = $self->{_safety_character}; |
94 | 94 |
|
95 | 95 |
my $column; |
96 |
- if ($self->{_tag_parse} && ($clause =~ /\s\{/ || $clause =~ /^\{/)) { |
|
96 |
+ my $sql = " " . $clause || ''; |
|
97 |
+ if ($self->{_tag_parse} && ($sql =~ /\s\{/)) { |
|
97 | 98 |
my $columns = $self->dbi->query_builder->build_query($clause)->{columns}; |
98 | 99 |
$column = $columns->[0]; |
99 | 100 |
} |
100 | 101 |
else { |
101 |
- my $sql = " " . $clause || ''; |
|
102 | 102 |
$sql =~ s/([0-9]):/$1\\:/g; |
103 |
- ($column) = $sql =~ /[^\\]:([$c\.]+)/s |
|
103 |
+ ($column) = $sql =~ /[^\\]:([$c\.]+)/s; |
|
104 | 104 |
} |
105 | 105 |
unless (defined $column) { |
106 | 106 |
push @$where, $clause; |