elasticsearch-perl
elasticsearch-perl copied to clipboard
detect more boolean types for boolean|long api type
Suggested fix for #245 by inverting the logic, since looks_like_number accepts too many valid inputs. Attempts to detect a boolean first, and only if that does not return true or false, return a number.
Additionally expands boolean detection using is_bool from JSON::MaybeXS (notably this supports the new builtin booleans, which on recent Perls can be returned by builtin::true or operators such as !).