Data::Rx::CoreType::one - the Rx //one type


Data-Rx documentation Contained in the Data-Rx distribution.

Index


Code Index:

NAME

Top

Data::Rx::CoreType::one - the Rx //one type

VERSION

Top

version 0.100110

AUTHOR

Top

  Ricardo SIGNES <rjbs@cpan.org>

COPYRIGHT AND LICENSE

Top


Data-Rx documentation Contained in the Data-Rx distribution.

use strict;
use warnings;
package Data::Rx::CoreType::one;
our $VERSION = '0.100110';
use base 'Data::Rx::CoreType';
# ABSTRACT: the Rx //one type

sub check {
  my ($self, $value) = @_;

  return if ! defined $value;
  return if ref $value and ! (
    eval { $value->isa('JSON::XS::Boolean') }
    or
    eval { $value->isa('JSON::PP::Boolean') }
    or
    eval { $value->isa('boolean') }
  );
  return 1;
}

sub subname   { 'one' }

1;

__END__