Evo::Class::T
version 0.0405
Types for "check" in Evo::Class. Right now there aren't so many of them.
{ package My::Foo; use Evo -Class, '-Class::T *'; has status => check => T_ENUM("ok", "not ok"); } my $obj = My::Foo->new(status => "ok"); $obj->status("badVal"); # dies
my $check = T_ENUM("ok", "good"); my($ok, $err) = $check->("bad");
Enum checker - a value must be one of the list;
alexbyk.com
This software is copyright (c) 2016 by alexbyk.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Evo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Evo
CPAN shell
perl -MCPAN -e shell install Evo
For more information on module installation, please visit the detailed CPAN module installation guide.