```{index} single: bool_overload; PDL::Ops function ``` ```{index} single: PDL::Ops::bool_overload; Perl function ``` # bool_overload `xs_bool_overload($pdl)` Boolean-context overload (`if $pdl`, `while $pdl`, etc.). Mirrors the `bool =>` closure in `Core.pm:838-845` of upstream PDL: - null PDL → false - multielement PDL → croak "multielement ndarray in conditional ..." - bad-valued 1-elem → croak "bad value ndarray in conditional ..." - 1-elem → truthiness of the single value