Acme::Mitey::Cards::Types - type constraint library
This type constraint library is even more basic that Type::Tiny. Exported types may be combined using Foo | Bar but parameterized type constraints like Foo[Bar] are not supported.
Foo | Bar
Foo[Bar]
Based on Any in Types::Standard.
The Any constant returns a blessed type constraint object. is_Any($value) checks a value against the type and returns a boolean. assert_Any($value) checks a value against the type and throws an error.
Any
is_Any($value)
assert_Any($value)
To import all of these functions:
use Acme::Mitey::Cards::Types qw( :Any );
Based on ArrayRef in Types::Standard.
The ArrayRef constant returns a blessed type constraint object. is_ArrayRef($value) checks a value against the type and returns a boolean. assert_ArrayRef($value) checks a value against the type and throws an error.
ArrayRef
is_ArrayRef($value)
assert_ArrayRef($value)
use Acme::Mitey::Cards::Types qw( :ArrayRef );
Based on Bool in Types::Standard.
The Bool constant returns a blessed type constraint object. is_Bool($value) checks a value against the type and returns a boolean. assert_Bool($value) checks a value against the type and throws an error.
Bool
is_Bool($value)
assert_Bool($value)
use Acme::Mitey::Cards::Types qw( :Bool );
Based on Card in Acme::Mitey::Cards::Types::Source.
The Card constant returns a blessed type constraint object. is_Card($value) checks a value against the type and returns a boolean. assert_Card($value) checks a value against the type and throws an error.
Card
is_Card($value)
assert_Card($value)
use Acme::Mitey::Cards::Types qw( :Card );
Based on CardArray in Acme::Mitey::Cards::Types::Source.
The CardArray constant returns a blessed type constraint object. is_CardArray($value) checks a value against the type and returns a boolean. assert_CardArray($value) checks a value against the type and throws an error.
CardArray
is_CardArray($value)
assert_CardArray($value)
use Acme::Mitey::Cards::Types qw( :CardArray );
Based on CardNumber in Acme::Mitey::Cards::Types::Source.
The CardNumber constant returns a blessed type constraint object. is_CardNumber($value) checks a value against the type and returns a boolean. assert_CardNumber($value) checks a value against the type and throws an error.
CardNumber
is_CardNumber($value)
assert_CardNumber($value)
use Acme::Mitey::Cards::Types qw( :CardNumber );
Based on Character in Acme::Mitey::Cards::Types::Source.
The Character constant returns a blessed type constraint object. is_Character($value) checks a value against the type and returns a boolean. assert_Character($value) checks a value against the type and throws an error.
Character
is_Character($value)
assert_Character($value)
use Acme::Mitey::Cards::Types qw( :Character );
Based on ClassName in Types::Standard.
The ClassName constant returns a blessed type constraint object. is_ClassName($value) checks a value against the type and returns a boolean. assert_ClassName($value) checks a value against the type and throws an error.
ClassName
is_ClassName($value)
assert_ClassName($value)
use Acme::Mitey::Cards::Types qw( :ClassName );
Based on CodeRef in Types::Standard.
The CodeRef constant returns a blessed type constraint object. is_CodeRef($value) checks a value against the type and returns a boolean. assert_CodeRef($value) checks a value against the type and throws an error.
CodeRef
is_CodeRef($value)
assert_CodeRef($value)
use Acme::Mitey::Cards::Types qw( :CodeRef );
Based on ConsumerOf in Types::Standard.
The ConsumerOf constant returns a blessed type constraint object. is_ConsumerOf($value) checks a value against the type and returns a boolean. assert_ConsumerOf($value) checks a value against the type and throws an error.
ConsumerOf
is_ConsumerOf($value)
assert_ConsumerOf($value)
use Acme::Mitey::Cards::Types qw( :ConsumerOf );
Based on CycleTuple in Types::Standard.
The CycleTuple constant returns a blessed type constraint object. is_CycleTuple($value) checks a value against the type and returns a boolean. assert_CycleTuple($value) checks a value against the type and throws an error.
CycleTuple
is_CycleTuple($value)
assert_CycleTuple($value)
use Acme::Mitey::Cards::Types qw( :CycleTuple );
Based on Deck in Acme::Mitey::Cards::Types::Source.
The Deck constant returns a blessed type constraint object. is_Deck($value) checks a value against the type and returns a boolean. assert_Deck($value) checks a value against the type and throws an error.
Deck
is_Deck($value)
assert_Deck($value)
use Acme::Mitey::Cards::Types qw( :Deck );
Based on Defined in Types::Standard.
The Defined constant returns a blessed type constraint object. is_Defined($value) checks a value against the type and returns a boolean. assert_Defined($value) checks a value against the type and throws an error.
Defined
is_Defined($value)
assert_Defined($value)
use Acme::Mitey::Cards::Types qw( :Defined );
Based on DelimitedStr in Types::Common::String.
The DelimitedStr constant returns a blessed type constraint object. is_DelimitedStr($value) checks a value against the type and returns a boolean. assert_DelimitedStr($value) checks a value against the type and throws an error.
DelimitedStr
is_DelimitedStr($value)
assert_DelimitedStr($value)
use Acme::Mitey::Cards::Types qw( :DelimitedStr );
Based on Dict in Types::Standard.
The Dict constant returns a blessed type constraint object. is_Dict($value) checks a value against the type and returns a boolean. assert_Dict($value) checks a value against the type and throws an error.
Dict
is_Dict($value)
assert_Dict($value)
use Acme::Mitey::Cards::Types qw( :Dict );
Based on Enum in Types::Standard.
The Enum constant returns a blessed type constraint object. is_Enum($value) checks a value against the type and returns a boolean. assert_Enum($value) checks a value against the type and throws an error.
Enum
is_Enum($value)
assert_Enum($value)
use Acme::Mitey::Cards::Types qw( :Enum );
Based on FaceCard in Acme::Mitey::Cards::Types::Source.
The FaceCard constant returns a blessed type constraint object. is_FaceCard($value) checks a value against the type and returns a boolean. assert_FaceCard($value) checks a value against the type and throws an error.
FaceCard
is_FaceCard($value)
assert_FaceCard($value)
use Acme::Mitey::Cards::Types qw( :FaceCard );
Based on FileHandle in Types::Standard.
The FileHandle constant returns a blessed type constraint object. is_FileHandle($value) checks a value against the type and returns a boolean. assert_FileHandle($value) checks a value against the type and throws an error.
FileHandle
is_FileHandle($value)
assert_FileHandle($value)
use Acme::Mitey::Cards::Types qw( :FileHandle );
Based on GlobRef in Types::Standard.
The GlobRef constant returns a blessed type constraint object. is_GlobRef($value) checks a value against the type and returns a boolean. assert_GlobRef($value) checks a value against the type and throws an error.
GlobRef
is_GlobRef($value)
assert_GlobRef($value)
use Acme::Mitey::Cards::Types qw( :GlobRef );
Based on Hand in Acme::Mitey::Cards::Types::Source.
The Hand constant returns a blessed type constraint object. is_Hand($value) checks a value against the type and returns a boolean. assert_Hand($value) checks a value against the type and throws an error.
Hand
is_Hand($value)
assert_Hand($value)
use Acme::Mitey::Cards::Types qw( :Hand );
Based on HasMethods in Types::Standard.
The HasMethods constant returns a blessed type constraint object. is_HasMethods($value) checks a value against the type and returns a boolean. assert_HasMethods($value) checks a value against the type and throws an error.
HasMethods
is_HasMethods($value)
assert_HasMethods($value)
use Acme::Mitey::Cards::Types qw( :HasMethods );
Based on HashRef in Types::Standard.
The HashRef constant returns a blessed type constraint object. is_HashRef($value) checks a value against the type and returns a boolean. assert_HashRef($value) checks a value against the type and throws an error.
HashRef
is_HashRef($value)
assert_HashRef($value)
use Acme::Mitey::Cards::Types qw( :HashRef );
Based on InstanceOf in Types::Standard.
The InstanceOf constant returns a blessed type constraint object. is_InstanceOf($value) checks a value against the type and returns a boolean. assert_InstanceOf($value) checks a value against the type and throws an error.
InstanceOf
is_InstanceOf($value)
assert_InstanceOf($value)
use Acme::Mitey::Cards::Types qw( :InstanceOf );
Based on Int in Types::Standard.
The Int constant returns a blessed type constraint object. is_Int($value) checks a value against the type and returns a boolean. assert_Int($value) checks a value against the type and throws an error.
Int
is_Int($value)
assert_Int($value)
use Acme::Mitey::Cards::Types qw( :Int );
Based on IntRange in Types::Common::Numeric.
The IntRange constant returns a blessed type constraint object. is_IntRange($value) checks a value against the type and returns a boolean. assert_IntRange($value) checks a value against the type and throws an error.
IntRange
is_IntRange($value)
assert_IntRange($value)
use Acme::Mitey::Cards::Types qw( :IntRange );
Based on Item in Types::Standard.
The Item constant returns a blessed type constraint object. is_Item($value) checks a value against the type and returns a boolean. assert_Item($value) checks a value against the type and throws an error.
Item
is_Item($value)
assert_Item($value)
use Acme::Mitey::Cards::Types qw( :Item );
Based on JokerCard in Acme::Mitey::Cards::Types::Source.
The JokerCard constant returns a blessed type constraint object. is_JokerCard($value) checks a value against the type and returns a boolean. assert_JokerCard($value) checks a value against the type and throws an error.
JokerCard
is_JokerCard($value)
assert_JokerCard($value)
use Acme::Mitey::Cards::Types qw( :JokerCard );
Based on LaxNum in Types::Standard.
The LaxNum constant returns a blessed type constraint object. is_LaxNum($value) checks a value against the type and returns a boolean. assert_LaxNum($value) checks a value against the type and throws an error.
LaxNum
is_LaxNum($value)
assert_LaxNum($value)
use Acme::Mitey::Cards::Types qw( :LaxNum );
Based on LowerCaseSimpleStr in Types::Common::String.
The LowerCaseSimpleStr constant returns a blessed type constraint object. is_LowerCaseSimpleStr($value) checks a value against the type and returns a boolean. assert_LowerCaseSimpleStr($value) checks a value against the type and throws an error.
LowerCaseSimpleStr
is_LowerCaseSimpleStr($value)
assert_LowerCaseSimpleStr($value)
use Acme::Mitey::Cards::Types qw( :LowerCaseSimpleStr );
Based on LowerCaseStr in Types::Common::String.
The LowerCaseStr constant returns a blessed type constraint object. is_LowerCaseStr($value) checks a value against the type and returns a boolean. assert_LowerCaseStr($value) checks a value against the type and throws an error.
LowerCaseStr
is_LowerCaseStr($value)
assert_LowerCaseStr($value)
use Acme::Mitey::Cards::Types qw( :LowerCaseStr );
Based on Map in Types::Standard.
The Map constant returns a blessed type constraint object. is_Map($value) checks a value against the type and returns a boolean. assert_Map($value) checks a value against the type and throws an error.
Map
is_Map($value)
assert_Map($value)
use Acme::Mitey::Cards::Types qw( :Map );
Based on Maybe in Types::Standard.
The Maybe constant returns a blessed type constraint object. is_Maybe($value) checks a value against the type and returns a boolean. assert_Maybe($value) checks a value against the type and throws an error.
Maybe
is_Maybe($value)
assert_Maybe($value)
use Acme::Mitey::Cards::Types qw( :Maybe );
Based on NegativeInt in Types::Common::Numeric.
The NegativeInt constant returns a blessed type constraint object. is_NegativeInt($value) checks a value against the type and returns a boolean. assert_NegativeInt($value) checks a value against the type and throws an error.
NegativeInt
is_NegativeInt($value)
assert_NegativeInt($value)
use Acme::Mitey::Cards::Types qw( :NegativeInt );
Based on NegativeNum in Types::Common::Numeric.
The NegativeNum constant returns a blessed type constraint object. is_NegativeNum($value) checks a value against the type and returns a boolean. assert_NegativeNum($value) checks a value against the type and throws an error.
NegativeNum
is_NegativeNum($value)
assert_NegativeNum($value)
use Acme::Mitey::Cards::Types qw( :NegativeNum );
Based on NegativeOrZeroInt in Types::Common::Numeric.
The NegativeOrZeroInt constant returns a blessed type constraint object. is_NegativeOrZeroInt($value) checks a value against the type and returns a boolean. assert_NegativeOrZeroInt($value) checks a value against the type and throws an error.
NegativeOrZeroInt
is_NegativeOrZeroInt($value)
assert_NegativeOrZeroInt($value)
use Acme::Mitey::Cards::Types qw( :NegativeOrZeroInt );
Based on NegativeOrZeroNum in Types::Common::Numeric.
The NegativeOrZeroNum constant returns a blessed type constraint object. is_NegativeOrZeroNum($value) checks a value against the type and returns a boolean. assert_NegativeOrZeroNum($value) checks a value against the type and throws an error.
NegativeOrZeroNum
is_NegativeOrZeroNum($value)
assert_NegativeOrZeroNum($value)
use Acme::Mitey::Cards::Types qw( :NegativeOrZeroNum );
Based on NonEmptySimpleStr in Types::Common::String.
The NonEmptySimpleStr constant returns a blessed type constraint object. is_NonEmptySimpleStr($value) checks a value against the type and returns a boolean. assert_NonEmptySimpleStr($value) checks a value against the type and throws an error.
NonEmptySimpleStr
is_NonEmptySimpleStr($value)
assert_NonEmptySimpleStr($value)
use Acme::Mitey::Cards::Types qw( :NonEmptySimpleStr );
Based on NonEmptyStr in Types::Common::String.
The NonEmptyStr constant returns a blessed type constraint object. is_NonEmptyStr($value) checks a value against the type and returns a boolean. assert_NonEmptyStr($value) checks a value against the type and throws an error.
NonEmptyStr
is_NonEmptyStr($value)
assert_NonEmptyStr($value)
use Acme::Mitey::Cards::Types qw( :NonEmptyStr );
Based on Num in Types::Standard.
The Num constant returns a blessed type constraint object. is_Num($value) checks a value against the type and returns a boolean. assert_Num($value) checks a value against the type and throws an error.
Num
is_Num($value)
assert_Num($value)
use Acme::Mitey::Cards::Types qw( :Num );
Based on NumRange in Types::Common::Numeric.
The NumRange constant returns a blessed type constraint object. is_NumRange($value) checks a value against the type and returns a boolean. assert_NumRange($value) checks a value against the type and throws an error.
NumRange
is_NumRange($value)
assert_NumRange($value)
use Acme::Mitey::Cards::Types qw( :NumRange );
Based on NumericCard in Acme::Mitey::Cards::Types::Source.
The NumericCard constant returns a blessed type constraint object. is_NumericCard($value) checks a value against the type and returns a boolean. assert_NumericCard($value) checks a value against the type and throws an error.
NumericCard
is_NumericCard($value)
assert_NumericCard($value)
use Acme::Mitey::Cards::Types qw( :NumericCard );
Based on NumericCode in Types::Common::String.
The NumericCode constant returns a blessed type constraint object. is_NumericCode($value) checks a value against the type and returns a boolean. assert_NumericCode($value) checks a value against the type and throws an error.
NumericCode
is_NumericCode($value)
assert_NumericCode($value)
use Acme::Mitey::Cards::Types qw( :NumericCode );
Based on Object in Types::Standard.
The Object constant returns a blessed type constraint object. is_Object($value) checks a value against the type and returns a boolean. assert_Object($value) checks a value against the type and throws an error.
Object
is_Object($value)
assert_Object($value)
use Acme::Mitey::Cards::Types qw( :Object );
Based on OptList in Types::Standard.
The OptList constant returns a blessed type constraint object. is_OptList($value) checks a value against the type and returns a boolean. assert_OptList($value) checks a value against the type and throws an error.
OptList
is_OptList($value)
assert_OptList($value)
use Acme::Mitey::Cards::Types qw( :OptList );
Based on Optional in Types::Standard.
The Optional constant returns a blessed type constraint object. is_Optional($value) checks a value against the type and returns a boolean. assert_Optional($value) checks a value against the type and throws an error.
Optional
is_Optional($value)
assert_Optional($value)
use Acme::Mitey::Cards::Types qw( :Optional );
Based on Overload in Types::Standard.
The Overload constant returns a blessed type constraint object. is_Overload($value) checks a value against the type and returns a boolean. assert_Overload($value) checks a value against the type and throws an error.
Overload
is_Overload($value)
assert_Overload($value)
use Acme::Mitey::Cards::Types qw( :Overload );
Based on Password in Types::Common::String.
The Password constant returns a blessed type constraint object. is_Password($value) checks a value against the type and returns a boolean. assert_Password($value) checks a value against the type and throws an error.
Password
is_Password($value)
assert_Password($value)
use Acme::Mitey::Cards::Types qw( :Password );
Based on PositiveInt in Types::Common::Numeric.
The PositiveInt constant returns a blessed type constraint object. is_PositiveInt($value) checks a value against the type and returns a boolean. assert_PositiveInt($value) checks a value against the type and throws an error.
PositiveInt
is_PositiveInt($value)
assert_PositiveInt($value)
use Acme::Mitey::Cards::Types qw( :PositiveInt );
Based on PositiveNum in Types::Common::Numeric.
The PositiveNum constant returns a blessed type constraint object. is_PositiveNum($value) checks a value against the type and returns a boolean. assert_PositiveNum($value) checks a value against the type and throws an error.
PositiveNum
is_PositiveNum($value)
assert_PositiveNum($value)
use Acme::Mitey::Cards::Types qw( :PositiveNum );
Based on PositiveOrZeroInt in Types::Common::Numeric.
The PositiveOrZeroInt constant returns a blessed type constraint object. is_PositiveOrZeroInt($value) checks a value against the type and returns a boolean. assert_PositiveOrZeroInt($value) checks a value against the type and throws an error.
PositiveOrZeroInt
is_PositiveOrZeroInt($value)
assert_PositiveOrZeroInt($value)
use Acme::Mitey::Cards::Types qw( :PositiveOrZeroInt );
Based on PositiveOrZeroNum in Types::Common::Numeric.
The PositiveOrZeroNum constant returns a blessed type constraint object. is_PositiveOrZeroNum($value) checks a value against the type and returns a boolean. assert_PositiveOrZeroNum($value) checks a value against the type and throws an error.
PositiveOrZeroNum
is_PositiveOrZeroNum($value)
assert_PositiveOrZeroNum($value)
use Acme::Mitey::Cards::Types qw( :PositiveOrZeroNum );
Based on Ref in Types::Standard.
The Ref constant returns a blessed type constraint object. is_Ref($value) checks a value against the type and returns a boolean. assert_Ref($value) checks a value against the type and throws an error.
Ref
is_Ref($value)
assert_Ref($value)
use Acme::Mitey::Cards::Types qw( :Ref );
Based on RegexpRef in Types::Standard.
The RegexpRef constant returns a blessed type constraint object. is_RegexpRef($value) checks a value against the type and returns a boolean. assert_RegexpRef($value) checks a value against the type and throws an error.
RegexpRef
is_RegexpRef($value)
assert_RegexpRef($value)
use Acme::Mitey::Cards::Types qw( :RegexpRef );
Based on RoleName in Types::Standard.
The RoleName constant returns a blessed type constraint object. is_RoleName($value) checks a value against the type and returns a boolean. assert_RoleName($value) checks a value against the type and throws an error.
RoleName
is_RoleName($value)
assert_RoleName($value)
use Acme::Mitey::Cards::Types qw( :RoleName );
Based on ScalarRef in Types::Standard.
The ScalarRef constant returns a blessed type constraint object. is_ScalarRef($value) checks a value against the type and returns a boolean. assert_ScalarRef($value) checks a value against the type and throws an error.
ScalarRef
is_ScalarRef($value)
assert_ScalarRef($value)
use Acme::Mitey::Cards::Types qw( :ScalarRef );
Based on Set in Acme::Mitey::Cards::Types::Source.
The Set constant returns a blessed type constraint object. is_Set($value) checks a value against the type and returns a boolean. assert_Set($value) checks a value against the type and throws an error.
Set
is_Set($value)
assert_Set($value)
use Acme::Mitey::Cards::Types qw( :Set );
Based on SimpleStr in Types::Common::String.
The SimpleStr constant returns a blessed type constraint object. is_SimpleStr($value) checks a value against the type and returns a boolean. assert_SimpleStr($value) checks a value against the type and throws an error.
SimpleStr
is_SimpleStr($value)
assert_SimpleStr($value)
use Acme::Mitey::Cards::Types qw( :SimpleStr );
Based on SingleDigit in Types::Common::Numeric.
The SingleDigit constant returns a blessed type constraint object. is_SingleDigit($value) checks a value against the type and returns a boolean. assert_SingleDigit($value) checks a value against the type and throws an error.
SingleDigit
is_SingleDigit($value)
assert_SingleDigit($value)
use Acme::Mitey::Cards::Types qw( :SingleDigit );
Based on Slurpy in Types::Standard.
The Slurpy constant returns a blessed type constraint object. is_Slurpy($value) checks a value against the type and returns a boolean. assert_Slurpy($value) checks a value against the type and throws an error.
Slurpy
is_Slurpy($value)
assert_Slurpy($value)
use Acme::Mitey::Cards::Types qw( :Slurpy );
Based on Str in Types::Standard.
The Str constant returns a blessed type constraint object. is_Str($value) checks a value against the type and returns a boolean. assert_Str($value) checks a value against the type and throws an error.
Str
is_Str($value)
assert_Str($value)
use Acme::Mitey::Cards::Types qw( :Str );
Based on StrLength in Types::Common::String.
The StrLength constant returns a blessed type constraint object. is_StrLength($value) checks a value against the type and returns a boolean. assert_StrLength($value) checks a value against the type and throws an error.
StrLength
is_StrLength($value)
assert_StrLength($value)
use Acme::Mitey::Cards::Types qw( :StrLength );
Based on StrMatch in Types::Standard.
The StrMatch constant returns a blessed type constraint object. is_StrMatch($value) checks a value against the type and returns a boolean. assert_StrMatch($value) checks a value against the type and throws an error.
StrMatch
is_StrMatch($value)
assert_StrMatch($value)
use Acme::Mitey::Cards::Types qw( :StrMatch );
Based on StrictNum in Types::Standard.
The StrictNum constant returns a blessed type constraint object. is_StrictNum($value) checks a value against the type and returns a boolean. assert_StrictNum($value) checks a value against the type and throws an error.
StrictNum
is_StrictNum($value)
assert_StrictNum($value)
use Acme::Mitey::Cards::Types qw( :StrictNum );
Based on StrongPassword in Types::Common::String.
The StrongPassword constant returns a blessed type constraint object. is_StrongPassword($value) checks a value against the type and returns a boolean. assert_StrongPassword($value) checks a value against the type and throws an error.
StrongPassword
is_StrongPassword($value)
assert_StrongPassword($value)
use Acme::Mitey::Cards::Types qw( :StrongPassword );
Based on Suit in Acme::Mitey::Cards::Types::Source.
The Suit constant returns a blessed type constraint object. is_Suit($value) checks a value against the type and returns a boolean. assert_Suit($value) checks a value against the type and throws an error.
Suit
is_Suit($value)
assert_Suit($value)
use Acme::Mitey::Cards::Types qw( :Suit );
Based on Tied in Types::Standard.
The Tied constant returns a blessed type constraint object. is_Tied($value) checks a value against the type and returns a boolean. assert_Tied($value) checks a value against the type and throws an error.
Tied
is_Tied($value)
assert_Tied($value)
use Acme::Mitey::Cards::Types qw( :Tied );
Based on Tuple in Types::Standard.
The Tuple constant returns a blessed type constraint object. is_Tuple($value) checks a value against the type and returns a boolean. assert_Tuple($value) checks a value against the type and throws an error.
Tuple
is_Tuple($value)
assert_Tuple($value)
use Acme::Mitey::Cards::Types qw( :Tuple );
Based on Undef in Types::Standard.
The Undef constant returns a blessed type constraint object. is_Undef($value) checks a value against the type and returns a boolean. assert_Undef($value) checks a value against the type and throws an error.
Undef
is_Undef($value)
assert_Undef($value)
use Acme::Mitey::Cards::Types qw( :Undef );
Based on UpperCaseSimpleStr in Types::Common::String.
The UpperCaseSimpleStr constant returns a blessed type constraint object. is_UpperCaseSimpleStr($value) checks a value against the type and returns a boolean. assert_UpperCaseSimpleStr($value) checks a value against the type and throws an error.
UpperCaseSimpleStr
is_UpperCaseSimpleStr($value)
assert_UpperCaseSimpleStr($value)
use Acme::Mitey::Cards::Types qw( :UpperCaseSimpleStr );
Based on UpperCaseStr in Types::Common::String.
The UpperCaseStr constant returns a blessed type constraint object. is_UpperCaseStr($value) checks a value against the type and returns a boolean. assert_UpperCaseStr($value) checks a value against the type and throws an error.
UpperCaseStr
is_UpperCaseStr($value)
assert_UpperCaseStr($value)
use Acme::Mitey::Cards::Types qw( :UpperCaseStr );
Based on Value in Types::Standard.
The Value constant returns a blessed type constraint object. is_Value($value) checks a value against the type and returns a boolean. assert_Value($value) checks a value against the type and throws an error.
Value
is_Value($value)
assert_Value($value)
use Acme::Mitey::Cards::Types qw( :Value );
For any type constraint Foo the following methods are available:
Foo->check( $value ) # boolean Foo->get_message( $value ) # error message, even if $value is ok Foo->validate( $value ) # error message, or undef if ok Foo->assert_valid( $value ) # returns true, dies if error Foo->assert_return( $value ) # returns $value, or dies if error Foo->to_TypeTiny # promotes the object to Type::Tiny
Objects overload stringification to return their name and overload coderefification to call assert_return.
assert_return
The objects as-is can be used in Moo or Mite isa options.
isa
has myattr => ( is => 'rw', isa => Foo, );
They cannot be used as-is in Moose or Mouse, but can be promoted to Type::Tiny and will then work:
has myattr => ( is => 'rw', isa => Foo->to_TypeTiny, );
To install Acme::Mitey::Cards, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::Mitey::Cards
CPAN shell
perl -MCPAN -e shell install Acme::Mitey::Cards
For more information on module installation, please visit the detailed CPAN module installation guide.