elasticsearch-perl icon indicating copy to clipboard operation
elasticsearch-perl copied to clipboard

detect more boolean types for boolean|long api type

Open Grinnz opened this issue 6 months ago • 2 comments

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 !).

Grinnz avatar Jun 10 '25 02:06 Grinnz