Group
Extension

Matches 2

boolean ( I/IN/INGY/boolean-0.46.tar.gz, INGY, 2016; MetaCPAN )
boolean/lib/boolean.pod ( view source; MetaCPAN )
ber, Null and Boolean. Perl lacks native
Boolean support.

Data interchange modules like YAML and JSON can now C<use boolean> to
encodeI<decode>roundtrip Boolean values.

=head1 FUNCTIONS

This module
ecated.

=head1 JSON SUPPORT

JSON::MaybeXS (or less preferably JSON.pm ) will encode Perl data with
boolean.pm values correctly if you use the C<convert_blessed> option:

    use JSON::MaybeXS;
    u
se boolean -truth;
    my $json = JSON::MaybeXS->new->convert_blessed;
    say $json->encode({false => (0 == 1)});     # Says: '{"false":false}',

=head1 AUTHOR

Ingy döt Net <ingy@cpan.org>

=head1 
boolean ( I/IN/INGY/boolean-0.46.tar.gz, INGY, 2016; MetaCPAN )
boolean/lib/boolean.pm ( view source; MetaCPAN )
0 } = $false;
    ${ \ !!1 } = $true;
    # make true and false read-only again
    &Internals::SvREADONLY( \ !!0, 1);
    &Internals::SvREADONLY( \ !!1, 1);
}

sub TO_JSON { ${$_[0]} ? \1 : \0 }

1;

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.