for my $col ( grep { $_ !~ /^\-/ } keys %$fin ) {
next unless ref $fin->{$col} eq 'ARRAY' and ($fin->{$col}[0]||'') =~ /^\-and$/i;
my $val_bag = { map {
- (! defined $_ ) ? ( UNDEF => undef )
- : ( ! ref $_ or is_plain_value $_ ) ? ( "VAL_$_" => $_ )
+ (! defined $_ ) ? ( UNDEF => undef )
+ : ( ! length ref $_ or is_plain_value $_ ) ? ( "VAL_$_" => $_ )
: ( ( 'SER_' . serialize $_ ) => $_ )
} @{$fin->{$col}}[1 .. $#{$fin->{$col}}] };
and
my $vref = is_plain_value( (values %$rhs)[0] )
) {
- push @conds, { $lhs => { $subop => @$vref } }
+ push @conds, { $lhs => { $subop => $$vref } }
}
else {
push @conds, { $lhs => $rhs };
if (my $v = is_plain_value($c->{cond})) {
push @query_steps,
- { year => $v->[0] },
- { title => $v->[0] },
- { -and => [ year => $v->[0], title => $v->[0] ] },
+ { year => $$v },
+ { title => $$v },
+ { -and => [ year => $$v, title => $$v ] },
;
}