... | ... |
@@ -1198,54 +1198,54 @@ sub _create_bind_values { |
1198 | 1198 |
$bind_type = _array_to_hash($bind_type) if ref $bind_type eq 'ARRAY'; |
1199 | 1199 |
|
1200 | 1200 |
# Create bind values |
1201 |
- my $bind = []; |
|
1202 |
- my $types = []; |
|
1203 |
- my $count = {}; |
|
1204 |
- my $not_exists = {}; |
|
1201 |
+ my @bind; |
|
1202 |
+ my @types; |
|
1203 |
+ my %count; |
|
1204 |
+ my %not_exists; |
|
1205 | 1205 |
for my $column (@$columns) { |
1206 | 1206 |
|
1207 | 1207 |
# Bind value |
1208 | 1208 |
if(ref $params->{$column} eq 'ARRAY') { |
1209 |
- my $i = $count->{$column} || 0; |
|
1210 |
- $i += $not_exists->{$column} || 0; |
|
1209 |
+ my $i = $count{$column} || 0; |
|
1210 |
+ $i += $not_exists{$column} || 0; |
|
1211 | 1211 |
my $found; |
1212 | 1212 |
for (my $k = $i; $i < @{$params->{$column}}; $k++) { |
1213 | 1213 |
if (ref $params->{$column}->[$k] eq 'DBIx::Custom::NotExists') { |
1214 |
- $not_exists->{$column}++; |
|
1214 |
+ $not_exists{$column}++; |
|
1215 | 1215 |
} |
1216 | 1216 |
else { |
1217 |
- push @$bind, $params->{$column}->[$k]; |
|
1217 |
+ push @bind, $params->{$column}->[$k]; |
|
1218 | 1218 |
$found = 1; |
1219 | 1219 |
last |
1220 | 1220 |
} |
1221 | 1221 |
} |
1222 | 1222 |
next unless $found; |
1223 | 1223 |
} |
1224 |
- else { push @$bind, $params->{$column} } |
|
1224 |
+ else { push @bind, $params->{$column} } |
|
1225 | 1225 |
|
1226 | 1226 |
# Filter |
1227 | 1227 |
if (my $f = $filter->{$column} || $self->{default_out_filter} || '') { |
1228 |
- $bind->[-1] = $f->($bind->[-1]); |
|
1228 |
+ $bind[-1] = $f->($bind[-1]); |
|
1229 | 1229 |
} |
1230 | 1230 |
|
1231 | 1231 |
# Type rule |
1232 | 1232 |
if ($self->{_type_rule_is_called}) { |
1233 | 1233 |
my $tf1 = $self->{"_into1"}->{dot}->{$column} |
1234 | 1234 |
|| $type_filters->{1}->{$column}; |
1235 |
- $bind->[-1] = $tf1->($bind->[-1]) if $tf1; |
|
1235 |
+ $bind[-1] = $tf1->($bind[-1]) if $tf1; |
|
1236 | 1236 |
my $tf2 = $self->{"_into2"}->{dot}->{$column} |
1237 | 1237 |
|| $type_filters->{2}->{$column}; |
1238 |
- $bind->[-1] = $tf2->($bind->[-1]) if $tf2; |
|
1238 |
+ $bind[-1] = $tf2->($bind[-1]) if $tf2; |
|
1239 | 1239 |
} |
1240 | 1240 |
|
1241 | 1241 |
# Bind types |
1242 |
- push @$types, $bind_type->{$column}; |
|
1242 |
+ push @types, $bind_type->{$column}; |
|
1243 | 1243 |
|
1244 | 1244 |
# Count up |
1245 |
- $count->{$column}++; |
|
1245 |
+ $count{$column}++; |
|
1246 | 1246 |
} |
1247 | 1247 |
|
1248 |
- return ($bind, $types); |
|
1248 |
+ return (\@bind, \@types); |
|
1249 | 1249 |
} |
1250 | 1250 |
|
1251 | 1251 |
sub _id_to_param { |