| Data-Rx documentation | Contained in the Data-Rx distribution. |
Data::Rx::CoreType::bool - the Rx //bool type
version 0.100110
Ricardo SIGNES <rjbs@cpan.org>
This software is copyright (c) 2010 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
| Data-Rx documentation | Contained in the Data-Rx distribution. |
use strict; use warnings; package Data::Rx::CoreType::bool; our $VERSION = '0.100110'; use base 'Data::Rx::CoreType'; # ABSTRACT: the Rx //bool type sub check { my ($self, $value) = @_; return( defined($value) and ref($value) and ( eval { $value->isa('JSON::XS::Boolean') } or eval { $value->isa('JSON::PP::Boolean') } or eval { $value->isa('boolean') } ) ); } sub subname { 'bool' } 1; __END__