Reindeer::Types - Reindeer combined type library
This document describes version 0.020 of Reindeer::Types - released December 20, 2017 as part of Reindeer.
package Foo; use Moose; use Reindeer::Types ':all';
This is a combined type library, allowing for the quick and easy import of all the type libraries Reindeer provides by default. Its primary goal is to make the types easily available even when using Reindeer isn't an option.
It is not necessary (or prudent) to directly use this in a Reindeer class (or role).
LoadableClass
A normal class / package.
LoadableRole
Like LoadableClass, except the loaded package must be a Moose::Role.
SimpleStr
A Str with no new-line characters and length <= 255.
Str
NonEmptySimpleStr
A SimpleStr with length > 0.
LowerCaseSimpleStr
A NonEmptySimpleStr with no uppercase characters. A coercion exists via lc from NonEmptySimpleStr.
lc
UpperCaseSimpleStr
A NonEmptySimpleStr with no lowercase characters. A coercion exists via uc from NonEmptySimpleStr.
uc
Password
A NonEmptySimpleStr with length > 3.
StrongPassword
A NonEmptySimpleStr with length > 7 containing at least one non-alpha character.
NonEmptyStr
A Str with length > 0.
LowerCaseStr
A Str with length > 0 and no uppercase characters. A coercion exists via lc from NonEmptyStr.
UpperCaseStr
A Str with length > 0 and no lowercase characters. A coercion exists via uc from NonEmptyStr.
NumericCode
A Str with no new-line characters that consists of only Numeric characters. Examples include, Social Security Numbers, Personal Identification Numbers, Postal Codes, HTTP Status Codes, etc. Supports attempting to coerce from a string that has punctuation or whitespaces in it ( e.g credit card number 4111-1111-1111-1111 ).
PositiveNum
PositiveOrZeroNum
PositiveInt
PositiveOrZeroInt
NegativeNum
NegativeOrZeroNum
NegativeInt
NegativeOrZeroInt
SingleDigit
Base type: TiedHash
This type coerces from ArrayRef. As of 0.004 we no longer coerce from HashRef, as that lead to 1) annoyingly easy to miss errors involving expecting $thing-attribute( { a => 1, b => 2, ... } )> to result in proper ordering; and 2) the Hash native trait appearing to work normally but instead silently destroying the preserved order (during certain write operations).
$thing-
(See also MooseX::Types::Tied::Hash::IxHash.)
has 'dir' => ( is => 'ro', isa => Dir, required => 1, coerce => 1, );
(See also MooseX::Types::Path::Class.)
has 'file' => ( is => 'ro', isa => File, required => 1, coerce => 1, );
We provide all Moose native types by including MooseX::Types::Moose; see that package for more information.
Please see those modules/websites for more information related to this module.
Reindeer
has the full list of type libraries we incorporate.
.
Please report any bugs or feature requests on the bugtracker website https://github.com/RsrchBoy/reindeer/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Chris Weyl <cweyl@alumni.drew.edu>
This software is Copyright (c) 2017, 2015, 2014, 2012, 2011 by Chris Weyl.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
2 POD Errors
The following errors were encountered while parsing the POD:
Nested L<> are illegal. Pretending inner one is X<...> so can continue looking for other errors.
To install Reindeer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Reindeer
CPAN shell
perl -MCPAN -e shell install Reindeer
For more information on module installation, please visit the detailed CPAN module installation guide.