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::Eq - type constraint for single string equality

SYNOPSIS

    use Type::Tiny::Eq;

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

    Type::Tiny::Eq->new( value => undef ); # dies

DESCRIPTION

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

Attributes

value

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