NAME

Evo::Class::T

VERSION

version 0.0405

DESCRIPTION

Types for "check" in Evo::Class. Right now there aren't so many of them.

SYNOPSYS

{

  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

FUNCTIONS

T_ENUM

my $check = T_ENUM("ok", "good");
my($ok, $err) = $check->("bad");

Enum checker - a value must be one of the list;

AUTHOR

alexbyk.com

COPYRIGHT AND LICENSE

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.