projects
/
scpubgit/Q-Branch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
a867b2d
)
is_op and register_op
Matt S Trout [Mon, 15 Jul 2019 22:06:31 +0000 (22:06 +0000)]
lib/SQL/Abstract.pm
patch
|
blob
|
blame
|
history
lib/SQL/Abstract/Clauses.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/SQL/Abstract.pm
b/lib/SQL/Abstract.pm
index
ea1a508
..
97e1816
100644
(file)
--- a/
lib/SQL/Abstract.pm
+++ b/
lib/SQL/Abstract.pm
@@
-543,7
+543,9
@@
sub render_expr {
sub _normalize_op {
my ($self, $raw) = @_;
- s/^-(?=.)//, s/\s+/_/g for my $op = lc $raw;
+ my $op = lc $raw;
+ return $op if grep $_->{$op}, @{$self}{qw(is_op expand_op render_op)};
+ s/^-(?=.)//, s/\s+/_/g for $op;
$op;
}
diff --git
a/lib/SQL/Abstract/Clauses.pm
b/lib/SQL/Abstract/Clauses.pm
index
74bb20e
..
88a3226
100644
(file)
--- a/
lib/SQL/Abstract/Clauses.pm
+++ b/
lib/SQL/Abstract/Clauses.pm
@@
-394,6
+394,8
@@
BEGIN {
}
}
+sub register_op { $_[0]->{is_op}{$_[1]} = 1; $_[0] }
+
sub statement_list { sort keys %{$_[0]->{clauses_of}} }
sub clauses_of {