The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Type::Tiny::Equ - type constraint for single string equality with undefined

SYNOPSIS

    use Type::Tiny::Equ;

    my $Foo = Type::Tiny::Equ->new( value => 'foo' );
    $Foo->check('foo'); # true
    $Foo->check('bar'); # false

    my $Undef = Type::Tiny::Equ->new( value => undef );
    $Undef->check(undef); # true
    $Undef->check(''); # false
    $Undef->check('foo'); # false

DESCRIPTION

This package inherits from Type::Tiny; see that for most documentation. Major differences are listed below:

Attributes

value

Allowable value string or undefined value. Non-string 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>