... | ... |
@@ -1095,10 +1095,15 @@ sub values_clause { |
1095 | 1095 |
my $q = substr($qp, 0, 1) || ''; |
1096 | 1096 |
my $p = substr($qp, 1, 1) || ''; |
1097 | 1097 |
|
1098 |
- my $safety_re = qr/^[$safety\.]+$/; |
|
1098 |
+ # Check unsafety keys |
|
1099 |
+ unless ((join('', keys %$param) || '') =~ /^[$safety\.]+$/) { |
|
1100 |
+ for my $column (keys %$param) { |
|
1101 |
+ croak qq{"$column" is not safety column name } . _subname |
|
1102 |
+ unless $column =~ /^[$safety\.]+$/; |
|
1103 |
+ } |
|
1104 |
+ } |
|
1105 |
+ |
|
1099 | 1106 |
for my $column (sort keys %$param) { |
1100 |
- croak qq{"$column" is not safety column name } . _subname |
|
1101 |
- unless $column =~ /$safety_re/; |
|
1102 | 1107 |
push @columns, "$q$column$p"; |
1103 | 1108 |
push @placeholders, |
1104 | 1109 |
ref $param->{$column} eq 'SCALAR' ? ${$param->{$column}} : |