Fix code warning messages in newer Perl installs

This commit is contained in:
Manuel Cillero 2020-04-12 12:50:11 +02:00
parent 58ead7c11f
commit 27ed9214ef
7 changed files with 48 additions and 22 deletions

View file

@ -511,7 +511,7 @@ sub COMPARE {
my ($field, $op, $value) = @_;
$field = trim($field);
$op = trim(one_space(uc($op)));
$op = uc(trim(one_space($op)));
return '' if is_empty($field) || is_empty($op);
$value = trim($value);
if (is_empty($value)) {
@ -528,7 +528,7 @@ sub COMPARE_STR {
my ($field, $op, $string) = @_;
$field = trim($field);
$op = trim(one_space(uc($op)));
$op = uc(trim(one_space($op)));
return '' if is_empty($field) || is_empty($op);
if (is_empty(trim($string))) {
return is_eq($op, 'IS NULL') || is_eq($op, 'IS NOT NULL') ? strval(' ', $field, ' ', $op) : '';
@ -612,7 +612,7 @@ sub IN_FIELD {
}
}
return $isnull if scalar(@infield) == 0;
return $isnull if scalar @infield == 0;
my $infield = strval($field, $isnot ? ' NOT IN ( ' : ' IN ( ', strval_join(', ', @infield), ' )');
return is_empty($isnull) ? $infield : strval("( $infield ", $isnot ? 'AND' : 'OR', " $isnull )");
}