my %methods = (
enable => sub { ;;;; },
+ eq_ignore_empty => sub { ($_[0] // '') eq '' ? () : +{ eq => $_[0] } },
map {
# since $_ is an alias it can't be used in a closure. even "".$_ or "$_"
# does not work, we need a real copy.
($key, $value) = _apply_all($key, $value, qr/\b::(\w+)/, { %methods, %{ $params{methods} || {} } });
($key, $value) = _dispatch_custom_filters($params{class}, $with_objects, $key, $value) if $params{class};
- push @result, $key, $value;
+ push @result, $key, $value if defined $key;
}
return \@result;
}
Adds "% .. %" around the search string.
+=item eq_ignore_empty
+
+Ignores this item if it's empty. Otherwise compares it with the
+standard SQL C<=> operator.
+
=back
=head2 METHODS (leading with ::)