NAME
Type::Tiny::NumEqu - type constraint for single number equality with undefined
SYNOPSIS
use Type::Tiny::NumEqu;
my $Foo = Type::Tiny::NumEqu->new( value => 123 );
$Foo->check(123); # true
$Foo->check('123'); # true
$Foo->check(124); # false
my $Undef = Type::Tiny::NumEqu->new( value => undef );
$Undef->check(undef); # true
$Undef->check(123); # false
DESCRIPTION
This package inherits from Type::Tiny; see that for most documentation. Major differences are listed below:
Attributes
value
-
Allowable value number or undefined value. Non-number values (e.g. objects with overloading) will be stringified in the constructor.
LICENSE
Copyright (C) kobaken.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
kobaken <kfly@cpan.org>