-
-
14 Oct 2019 14:45:43 UTC
- Distribution: Do
- Module version: 1.88
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (815 / 9 / 11)
- Kwalitee
Bus factor: 1- % Coverage
- License: apache_2_0
- Perl: v5.14.0
- Activity
24 month- Tools
- Download (268.46KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 3 contributors-
Adam Hopkins
-
Anthony Brummett
-
José Joaquín Atria
- NAME
- ABSTRACT
- SYNOPSIS
- DESCRIPTION
- INHERITANCE
- FUNCTIONS
- doargs
- doarray
- doboolean
- docli
- docode
- dodata
- dodumpable
- doexception
- dofloat
- dofunc
- dohash
- doimmutable
- donumber
- doopts
- doregexp
- doreplace
- doscalar
- dosearch
- dospace
- dostashable
- dostate
- dostring
- dostruct
- dothrowable
- doundef
- dovars
- generatecoercion
- generateconstraint
- generateexplanation
- library
- options
- register
- registerall
- CONSTRAINTS
- any
- arraylike
- argsobj
- argsobject
- arrayobj
- arrayobject
- arrayref
- bool
- boolobj
- boolobject
- booleanobj
- booleanobject
- classname
- codelike
- cliobj
- cliobject
- codeobj
- codeobject
- coderef
- consumerof
- dataobj
- dataobject
- defined
- dict
- dumpable
- enum
- exceptionobj
- exceptionobject
- filehandle
- floatobj
- floatobject
- funcobj
- funcobject
- globref
- hasmethods
- hashlike
- hashobj
- hashobject
- hashref
- immutable
- instanceof
- int
- intobj
- intobject
- intrange
- integerobj
- integerobject
- item
- laxnum
- lowercasesimplestr
- lowercasestr
- map
- maybe
- negativeint
- negativenum
- negativeorzeroint
- negativeorzeronum
- nonemptysimplestr
- nonemptystr
- num
- numberlike
- numobj
- numobject
- numrange
- numberobject
- numericcode
- object
- optsobj
- optsobject
- optlist
- optional
- overload
- password
- positiveint
- positivenum
- positiveorzeroint
- positiveorzeronum
- ref
- regexpobj
- regexpobject
- regexpref
- replaceobj
- replaceobject
- rolename
- scalarobj
- scalarobject
- scalarref
- searchobj
- searchobject
- simplestr
- singledigit
- spaceobj
- spaceobject
- stashable
- stateobj
- stateobject
- str
- strmatch
- strobj
- strobject
- strictnum
- stringlike
- stringobj
- stringobject
- strongpassword
- structobj
- structobject
- throwable
- tied
- tuple
- typetiny
- undef
- undefobj
- undefobject
- uppercasesimplestr
- uppercasestr
- value
- varsobj
- varsobject
- CREDITS
- AUTHOR
- LICENSE
- PROJECT
- SEE ALSO
NAME
Data::Object::Library
ABSTRACT
Data-Object Type Library
SYNOPSIS
use Data::Object::Library;
DESCRIPTION
This package provides a core type library for the Do framework.
INHERITANCE
This package inherits behaviors from:
FUNCTIONS
This package implements the following functions.
doargs
DoArgs() : HashRef
This function returns the type configuration for a Data::Object::Args object.
doarray
DoArray() : HashRef
This function returns the type configuration for a Data::Object::Array object.
doboolean
DoBoolean() : HashRef
This function returns the type configuration for a Data::OBject::Code object.
docli
DoCli() : HashRef
This function returns the type configuration for a Data::Object::Cli object.
docode
DoCode() : HashRef
This function returns the type configuration for a Data::Object::Code object.
dodata
DoData() : HashRef
This function returns the type configuration for a Data::Object::Data object.
dodumpable
DoDumpable() : HashRef
This function returns the type configuration for an object with the Data::Object::Role::Dumpable role.
doexception
DoException() : HashRef
This function returns the type configuration for a Data::Object::Exception object.
dofloat
DoFloat() : HashRef
This function returns the type configuration for a Data::Object::Float object.
dofunc
DoFunc() : HashRef
This function returns the type configuration for a Data::Object::Func object.
dohash
DoHash() : HashRef
This function returns the type configuration for a Data::Object::Hash object.
doimmutable
DoImmutable() : HashRef
This function returns the type configuration for an object with the Data::Object::Role::Immutable role.
donumber
DoNumber() : HashRef
This function returns the type configuration for a Data::Object::Number object.
doopts
DoOpts() : HashRef
This function returns the type configuration for a Data::Object::Opts object.
doregexp
DoRegexp() : HashRef
This function returns the type configuration for a Data::Object::Regexp object.
doreplace
DoReplace() : HashRef
This function returns the type configuration for a Data::Object::Replace object.
doscalar
DoScalar() : HashRef
This function returns the type configuration for a Data::Object::Scalar object.
dosearch
DoSearch() : HashRef
This function returns the type configuration for a Data::Object::Search object.
dospace
DoSpace() : HashRef
This function returns the type configuration for a Data::Object::Space object.
dostashable
DoStashable() : HashRef
This function returns the type configuration for an object with the Data::Object::Role::Stashable role.
dostate
DoState() : HashRef
This function returns the type configuration for a Data::Object::State object.
dostring
DoString() : HashRef
This function returns the type configuration for a Data::Object::String object.
dostruct
DoStruct() : HashRef
This function returns the type configuration for a Data::Object::Struct object.
dothrowable
DoThrowable() : HashRef
This function returns the type configuration for an object with the Data::Object::Role::Throwable role.
doundef
DoUndef() : HashRef
This function returns the type configuration for a Data::Object::Undef object.
dovars
DoVars() : HashRef
This function returns the type configuration for a Data::Object::Vars object.
generatecoercion
GenerateCoercion(HashRef $config) : InstanceOf["Type::Coercion"]
This function takes a type configuration hashref, then generates and returns a type coercion based on its configuration.
generateconstraint
GenerateConstraint(HashRef $config) : CodeRef
This function takes a type configuration hashref, then generates and returns a coderef which validates the type based on its configuration.
generateexplanation
GenerateExplanation(HashRef $config) : CodeRef
This function takes a type configuration hashref, then generates and returns a coderef which returns a deep-explanation of the type failure based on its configuration.
library
Library() : InstanceOf["Type::Library"]
This function returns the core type library object.
options
Options(HashRef $config) : (Any)
This function takes a type configuration hashref, then generates and returns a set of options relevant to creating Type::Tiny objects.
register
Register(HashRef $config) : InstanceOf["Type::Tiny"]
This function takes a type configuration hashref, then generates and returns a Type::Tiny object based on its configuration.
registerall
RegisterAll(HashRef $config) : InstanceOf["Type::Tiny"]
This function takes a type configuration hashref, then generates and returns a Type::Tiny object based on its configuration. This method also registers aliases as stand-alone types in the library.
CONSTRAINTS
This package provides the following type constraints.
any
# Any
The
Any
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Any
function can be used to throw an exception is the argument can not be validated. Theis_Any
function can be used to return true or false if the argument can not be validated.arraylike
# ArrayLike
The
ArrayLike
type constraint is provided by the Types::TypeTiny library. Please see that documentation for more information. Theassert_ArrayLike
function can be used to throw an exception if the argument can not be validated. Theis_ArrayLike
function can be used to return true or false if the argument can not be validated.argsobj
# ArgsObj
The
ArgsObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Args object. Theassert_ArgsObj
function can be used to throw an exception if the argument can not be validated. Theis_ArgsObj
function can be used to return true or false if the argument can not be validated.argsobject
# ArgsObject
The
ArgsObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Args object. Theassert_ArgsObject
function can be used to throw an exception if the argument can not be validated. Theis_ArgsObject
function can be used to return true or false if the argument can not be validated.arrayobj
# ArrayObj
The
ArrayObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Array object. Theassert_ArrayObj
function can be used to throw an exception if the argument can not be validated. Theis_ArrayObj
function can be used to return true or false if the argument can not be validated.arrayobject
# ArrayObject
The
ArrayObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Array object. Theassert_ArrayObject
function can be used to throw an exception if the argument can not be validated. Theis_ArrayObject
function can be used to return true or false if the argument can not be validated.arrayref
# ArrayRef
The
ArrayRef
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_ArrayRef
function can be used to throw an exception if the argument can not be validated. Theis_ArrayRef
function can be used to return true or false if the argument can not be validated.bool
# Bool
The
Bool
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Bool
function can be used to throw an exception if the argument can not be validated. Theis_Bool
function can be used to return true or false if the argument can not be validated.boolobj
# BoolObj
The
BoolObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Boolean object. Theassert_BoolObj
function can be used to throw an exception if the argument can not be validated. Theis_BoolObj
function can be used to return true or false if the argument can not be validated.boolobject
# BoolObject
The
BoolObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Boolean object. Theassert_BoolObject
function can be used to throw an exception if the argument can not be validated. Theis_BoolObject
function can be used to return true or false if the argument can not be validated.booleanobj
# BooleanObj
The
BooleanObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Boolean object. Theassert_BooleanObj
function can be used to throw an exception if the argument can not be validated. Theis_BooleanObj
function can be used to return true or false if the argument can not be validated.booleanobject
# BooleanObject
The
BooleanObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Boolean object. Theassert_BooleanObject
function can be used to throw an exception if the argument can not be validated. Theis_BooleanObject
function can be used to return true or false if the argument can not be validated.classname
# ClassName["MyClass"]
The
ClassName
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_ClassName
function can be used to throw an exception if the argument can not be validated. Theis_ClassName
function can be used to return true or false if the argument can not be validated.codelike
# CodeLike
The
CodeLike
type constraint is provided by the Types::TypeTiny library. Please see that documentation for more information. Theassert_CodeLike
function can be used to throw an exception if the argument can not be validated. Theis_CodeLike
function can be used to return true or false if the argument can not be validated.cliobj
# CliObj
The
CliObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Cli object. Theassert_CliObj
function can be used to throw an exception if the argument can not be validated. Theis_CliObj
function can be used to return true or false if the argument can not be validated.cliobject
# CliObject
The
CliObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Cli object. Theassert_CliObject
function can be used to throw an exception if the argument can not be validated. Theis_CliObject
function can be used to return true or false if the argument can not be validated.codeobj
# CodeObj
The
CodeObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Code object. Theassert_CodeObj
function can be used to throw an exception if the argument can not be validated. Theis_CodeObj
function can be used to return true or false if the argument can not be validated.codeobject
# CodeObject
The
CodeObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Code object. Theassert_CodeObject
function can be used to throw an exception if the argument can not be validated. Theis_CodeObject
function can be used to return true or false if the argument can not be validated.coderef
# CodeRef
The
CodeRef
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_CodeRef
function can be used to throw an exception if the argument can not be validated. Theis_CodeRef
function can be used to return true or false if the argument can not be validated.consumerof
# ConsumerOf["MyRole"]
The
ConsumerOf
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_ConsumerOf
function can be used to throw an exception if the argument can not be validated. Theis_ConsumerOf
function can be used to return true or false if the argument can not be validated.dataobj
# DataObj
The
DataObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Data object. Theassert_DataObj
function can be used to throw an exception if the argument can not be validated. Theis_DataObj
function can be used to return true or false if the argument can not be validated.dataobject
# DataObject
The
DataObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Data object. Theassert_DataObject
function can be used to throw an exception if the argument can not be validated. Theis_DataObject
function can be used to return true or false if the argument can not be validated.defined
# Defined
The
Defined
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Defined
function can be used to throw an exception if the argument can not be validated. Theis_Defined
function can be used to return true or false if the argument can not be validated.dict
# Dict
The
Dict
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Dict
function can be used to throw an exception if the argument can not be validated. Theis_Dict
function can be used to return true or false if the argument can not be validated.dumpable
# Dumpable
The
Dumpable
type constraint is provided by this library and accepts any object that is a consumer of the Data::Object::Role::Dumpable role. Theassert_Dumpable
function can be used to throw an exception if the argument can not be validated. Theis_Dumpable
function can be used to return true or false if the argument can not be validated.enum
# Enum[qw(A B C)]
The
Enum
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Enum
function can be used to throw an exception if the argument can not be validated. Theis_Enum
function can be used to return true or false if the argument can not be validated.exceptionobj
# ExceptionObj
The
ExceptionObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Exception object. Theassert_ExceptionObj
function can be used to throw an exception if the argument can not be validated. Theis_ExceptionObj
function can be used to return true or false if the argument can not be validated.exceptionobject
# ExceptionObject
The
ExceptionObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Exception object. Theassert_ExceptionObject
function can be used to throw an exception if the argument can not be validated. Theis_ExceptionObject
function can be used to return true or false if the argument can not be validated.filehandle
# FileHandle
The
FileHandle
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_FileHandle
function can be used to throw an exception if the argument can not be validated. Theis_FileHandle
function can be used to return true or false if the argument can not be validated.floatobj
# FloatObj
The
FloatObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Float object. Theassert_FloatObj
function can be used to throw an exception if the argument can not be validated. Theis_FloatObj
function can be used to return true or false if the argument can not be validated.floatobject
# FloatObject
The
FloatObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Float object. Theassert_FloatObject
function can be used to throw an exception if the argument can not be validated. Theis_FloatObject
function can be used to return true or false if the argument can not be validated.funcobj
# FuncObj
The
FuncObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Func object. Theassert_FuncObj
function can be used to throw an exception if the argument can not be validated. Theis_FuncObj
function can be used to return true or false if the argument can not be validated.funcobject
# FuncObject
The
FuncObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Func object. Theassert_FuncObject
function can be used to throw an exception if the argument can not be validated. Theis_FuncObject
function can be used to return true or false if the argument can not be validated.globref
# GlobRef
The
GlobRef
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_GlobRef
function can be used to throw an exception if the argument can not be validated. Theis_GlobRef
function can be used to return true or false if the argument can not be validated.hasmethods
# HasMethods["new"]
The
HasMethods
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_HasMethods
function can be used to throw an exception if the argument can not be validated. Theis_HasMethods
function can be used to return true or false if the argument can not be validated.hashlike
# HashLike
The
HashLike
type constraint is provided by the Types::TypeTiny library. Please see that documentation for more information. Theassert_HashLike
function can be used to throw an exception if the argument can not be validated. Theis_HashLike
function can be used to return true or false if the argument can not be validated.hashobj
# HashObj
The
HashObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Hash object. Theassert_HashObj
function can be used to throw an exception if the argument can not be validated. Theis_HashObj
function can be used to return true or false if the argument can not be validated.hashobject
# HashObject
The
HashObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Hash object. Theassert_HashObject
function can be used to throw an exception if the argument can not be validated. Theis_HashObject
function can be used to return true or false if the argument can not be validated.hashref
# HashRef
The
HashRef
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_HashRef
function can be used to throw an exception if the argument can not be validated. Theis_HashRef
function can be used to return true or false if the argument can not be validated.immutable
# Immutable
The
Immutable
type constraint is provided by this library and accepts any object that is a consumer of the Data::Object::Role::Immutable role. Theassert_Immutable
function can be used to throw an exception if the argument can not be validated. Theis_Immutable
function can be used to return true or false if the argument can not be validated.instanceof
# InstanceOf[MyClass]
The
InstanceOf
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_InstanceOf
function can be used to throw an exception if the argument can not be validated. Theis_InstanceOf
function can be used to return true or false if the argument can not be validated.int
# Int
The
Int
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Int
function can be used to throw an exception if the argument can not be validated. Theis_Int
function can be used to return true or false if the argument can not be validated.intobj
# IntObj
The
IntObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Integer object. Theassert_IntObj
function can be used to throw an exception if the argument can not be validated. Theis_IntObj
function can be used to return true or false if the argument can not be validated.intobject
# IntObject
The
IntObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Integer object. Theassert_IntObject
function can be used to throw an exception if the argument can not be validated. Theis_IntObject
function can be used to return true or false if the argument can not be validated.intrange
# IntRange[0, 25]
The
IntRange
type constraint is provided by the Types::TypeTiny library. Please see that documentation for more information. Theassert_IntRange
function can be used to throw an exception if the argument can not be validated. Theis_IntRange
function can be used to return true or false if the argument can not be validated.integerobj
# IntegerObj
The
IntegerObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Integer object. Theassert_IntegerObj
function can be used to throw an exception if the argument can not be validated. Theis_IntegerObj
function can be used to return true or false if the argument can not be validated.integerobject
# IntegerObject
The
IntegerObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Integer object. Theassert_IntegerObject
function can be used to throw an exception if the argument can not be validated. Theis_IntegerObject
function can be used to return true or false if the argument can not be validated.item
# Item
The
Item
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Item
function can be used to throw an exception if the argument can not be validated. Theis_Item
function can be used to return true or false if the argument can not be validated.laxnum
# LaxNum
The
LaxNum
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_LaxNum
function can be used to throw an exception if the argument can not be validated. Theis_LaxNum
function can be used to return true or false if the argument can not be validated.lowercasesimplestr
# LowerCaseSimpleStr
The
LowerCaseSimpleStr
type constraint is provided by the Types::Common::String library. Please see that documentation for more Theassert_LowerCaseSimpleStr
function can be used to throw an exception if the argument can not be validated. Theis_LowerCaseSimpleStr
function can be used to return true or false if the argument can not be validated. information.lowercasestr
# LowerCaseStr
The
LowerCaseStr
type constraint is provided by the Types::Common::String library. Please see that documentation for more information. Theassert_type
function can be used to throw an exception if the argument can not be validated. Theis_type
function can be used to return true or false if the argument can not be validated.map
# Map[Int, HashRef]
The
Map
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Map
function can be used to throw an exception if the argument can not be validated. Theis_Map
function can be used to return true or false if the argument can not be validated.maybe
# Maybe[Object]
The
Maybe
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Maybe
function can be used to throw an exception if the argument can not be validated. Theis_Maybe
function can be used to return true or false if the argument can not be validated.negativeint
# NegativeInt
The
NegativeInt
type constraint is provided by the Types::Common::Numeric library. Please see that documentation for more information. Theassert_NegativeInt
function can be used to throw an exception if the argument can not be validated. Theis_NegativeInt
function can be used to return true or false if the argument can not be validated.negativenum
# NegativeNum
The
NegativeNum
type constraint is provided by the Types::Common::Numeric library. Please see that documentation for more information. Theassert_NegativeNum
function can be used to throw an exception if the argument can not be validated. Theis_NegativeNum
function can be used to return true or false if the argument can not be validated.negativeorzeroint
# NegativeOrZeroInt
The
NegativeOrZeroInt
type constraint is provided by the Types::Common::Numeric library. Please see that documentation for more Theassert_NegativeOrZeroInt
function can be used to throw an exception if the argument can not be validated. Theis_NegativeOrZeroInt
function can be used to return true or false if the argument can not be validated. information.negativeorzeronum
# NegativeOrZeroNum
The
NegativeOrZeroNum
type constraint is provided by the Types::Common::Numeric library. Please see that documentation for more Theassert_type
function can be used to throw an exception if the argument can not be validated. Theis_type
function can be used to return true or false if the argument can not be validated. information.nonemptysimplestr
# NonEmptySimpleStr
The
NonEmptySimpleStr
type constraint is provided by the Types::Common::String library. Please see that documentation for more Theassert_type
function can be used to throw an exception if the argument can not be validated. Theis_type
function can be used to return true or false if the argument can not be validated. information.nonemptystr
# NonEmptyStr
The
NonEmptyStr
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_type
function can be used to throw an exception if the argument can not be validated. Theis_type
function can be used to return true or false if the argument can not be validated.num
# Num
The
Num
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Num
function can be used to throw an exception if the argument can not be validated. Theis_Num
function can be used to return true or false if the argument can not be validated.numberlike
# NumberLike
The
NumberLike
type constraint is provided by the this library and accepts any value that looks like a number, or object that overloads stringification and looks like a number stringified. Please see that documentation for more information. Theassert_NumberLike
function can be used to throw an exception if the argument can not be validated. Theis_NumberLike
function can be used to return true or false if the argument can not be validated.numobj
# NumObj
The
NumObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Number object. Theassert_NumObj
function can be used to throw an exception if the argument can not be validated. Theis_NumObj
function can be used to return true or false if the argument can not be validated.numobject
# NumObject
The
NumObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Number object. Theassert_NumObject
function can be used to throw an exception if the argument can not be validated. Theis_NumObject
function can be used to return true or false if the argument can not be validated.numrange
# NumRange[0, 25]
The
NumRange
type constraint is provided by the Types::TypeTiny library. Please see that documentation for more information. Theassert_NumRange
function can be used to throw an exception if the argument can not be validated. Theis_NumRange
function can be used to return true or false if the argument can not be validated.numberobject
# NumberObject
The
NumberObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Number object. Theassert_NumberObject
function can be used to throw an exception if the argument can not be validated. Theis_NumberObject
function can be used to return true or false if the argument can not be validated.numericcode
# NumericCode
The
NumericCode
type constraint is provided by the Types::Common::String library. Please see that documentation for more information. Theassert_NumericCode
function can be used to throw an exception if the argument can not be validated. Theis_NumericCode
function can be used to return true or false if the argument can not be validated.object
# Object
The
Object
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Object
function can be used to throw an exception if the argument can not be validated. Theis_Object
function can be used to return true or false if the argument can not be validated.optsobj
# OptsObj
The
OptsObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Opts object. Theassert_OptsObj
function can be used to throw an exception if the argument can not be validated. Theis_OptsObj
function can be used to return true or false if the argument can not be validated.optsobject
# OptsObject
The
OptsObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Opts object. Theassert_OptsObject
function can be used to throw an exception if the argument can not be validated. Theis_OptsObject
function can be used to return true or false if the argument can not be validated.optlist
# OptList
The
OptList
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_OptList
function can be used to throw an exception if the argument can not be validated. Theis_OptList
function can be used to return true or false if the argument can not be validated.optional
# Dict[id => Optional[Int]]
The
Optional
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Optional
function can be used to throw an exception if the argument can not be validated. Theis_Optional
function can be used to return true or false if the argument can not be validated.overload
# Overload[qw("")]
The
Overload
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Overload
function can be used to throw an exception if the argument can not be validated. Theis_Overload
function can be used to return true or false if the argument can not be validated.password
# Password
The
Password
type constraint is provided by the Types::Common::String library. Please see that documentation for more information. Theassert_Password
function can be used to throw an exception if the argument can not be validated. Theis_Password
function can be used to return true or false if the argument can not be validated.positiveint
# PositiveInt
The
PositiveInt
type constraint is provided by the Types::Common::Numeric library. Please see that documentation for more information. Theassert_PositiveInt
function can be used to throw an exception if the argument can not be validated. Theis_PositiveInt
function can be used to return true or false if the argument can not be validated.positivenum
# PositiveNum
The
PositiveNum
type constraint is provided by the Types::Common::Numeric library. Please see that documentation for more information. Theassert_PositiveNum
function can be used to throw an exception if the argument can not be validated. Theis_PositiveNum
function can be used to return true or false if the argument can not be validated.positiveorzeroint
# PositiveOrZeroInt
The
PositiveOrZeroInt
type constraint is provided by the Types::Common::Numeric library. Please see that documentation for more Theassert_PositiveOrZeroInt
function can be used to throw an exception if the argument can not be validated. Theis_PositiveOrZeroInt
function can be used to return true or false if the argument can not be validated. information.positiveorzeronum
# PositiveOrZeroNum
The
PositiveOrZeroNum
type constraint is provided by the Types::Common::Numeric library. Please see that documentation for more Theassert_type
function can be used to throw an exception if the argument can not be validated. Theis_type
function can be used to return true or false if the argument can not be validated. information.ref
# Ref["SCALAR"]
The
Ref
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_type
function can be used to throw an exception if the argument can not be validated. Theis_type
function can be used to return true or false if the argument can not be validated.regexpobj
# RegexpObj
The
RegexpObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Regexp object. Theassert_RegexpObj
function can be used to throw an exception if the argument can not be validated. Theis_RegexpObj
function can be used to return true or false if the argument can not be validated.regexpobject
# RegexpObject
The
RegexpObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Regexp object. Theassert_RegexpObject
function can be used to throw an exception if the argument can not be validated. Theis_RegexpObject
function can be used to return true or false if the argument can not be validated.regexpref
# RegexpRef
The
RegexpRef
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_RegexpRef
function can be used to throw an exception if the argument can not be validated. Theis_RegexpRef
function can be used to return true or false if the argument can not be validated.replaceobj
# ReplaceObj
The
ReplaceObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Replace object. Theassert_ReplaceObj
function can be used to throw an exception if the argument can not be validated. Theis_ReplaceObj
function can be used to return true or false if the argument can not be validated.replaceobject
# ReplaceObject
The
ReplaceObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Replace object. Theassert_ReplaceObject
function can be used to throw an exception if the argument can not be validated. Theis_ReplaceObject
function can be used to return true or false if the argument can not be validated.rolename
# RoleName
The
RoleName
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_RoleName
function can be used to throw an exception if the argument can not be validated. Theis_RoleName
function can be used to return true or false if the argument can not be validated.scalarobj
# ScalarObj
The
ScalarObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Scalar object. Theassert_ScalarObj
function can be used to throw an exception if the argument can not be validated. Theis_ScalarObj
function can be used to return true or false if the argument can not be validated.scalarobject
# ScalarObject
The
ScalarObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Scalar object. Theassert_ScalarObject
function can be used to throw an exception if the argument can not be validated. Theis_ScalarObject
function can be used to return true or false if the argument can not be validated.scalarref
# ScalarRef
The
ScalarRef
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_ScalarRef
function can be used to throw an exception if the argument can not be validated. Theis_ScalarRef
function can be used to return true or false if the argument can not be validated.searchobj
# SearchObj
The
SearchObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Search object. Theassert_SearchObj
function can be used to throw an exception if the argument can not be validated. Theis_SearchObj
function can be used to return true or false if the argument can not be validated.searchobject
# SearchObject
The
SearchObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Search object. Theassert_SearchObject
function can be used to throw an exception if the argument can not be validated. Theis_SearchObject
function can be used to return true or false if the argument can not be validated.simplestr
# SimpleStr
The
SimpleStr
type constraint is provided by the Types::Common::String library. Please see that documentation for more information. Theassert_SimpleStr
function can be used to throw an exception if the argument can not be validated. Theis_SimpleStr
function can be used to return true or false if the argument can not be validated.singledigit
# SingleDigit
The
SingleDigit
type constraint is provided by the Types::Common::Numeric library. Please see that documentation for more information. Theassert_SingleDigit
function can be used to throw an exception if the argument can not be validated. Theis_SingleDigit
function can be used to return true or false if the argument can not be validated.spaceobj
# SpaceObj
The
SpaceObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Space object. Theassert_SpaceObj
function can be used to throw an exception if the argument can not be validated. Theis_SpaceObj
function can be used to return true or false if the argument can not be validated.spaceobject
# SpaceObject
The
SpaceObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Space object. Theassert_SpaceObject
function can be used to throw an exception if the argument can not be validated. Theis_SpaceObject
function can be used to return true or false if the argument can not be validated.stashable
# Stashable
The
Stashable
type constraint is provided by this library and accepts any object that is a consumer of the Data::Object::Role::Stashable role. Theassert_Stashable
function can be used to throw an exception if the argument can not be validated. Theis_Stashable
function can be used to return true or false if the argument can not be validated.stateobj
# StateObj
The
StateObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::State object. Theassert_StateObj
function can be used to throw an exception if the argument can not be validated. Theis_StateObj
function can be used to return true or false if the argument can not be validated.stateobject
# StateObject
The
StateObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::State object. Theassert_StateObject
function can be used to throw an exception if the argument can not be validated. Theis_StateObject
function can be used to return true or false if the argument can not be validated.str
# Str
The
Str
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Str
function can be used to throw an exception if the argument can not be validated. Theis_Str
function can be used to return true or false if the argument can not be validated.strmatch
# StrMatch[qr/^[A-Z]+$/]
The
StrMatch
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_StrMatch
function can be used to throw an exception if the argument can not be validated. Theis_StrMatch
function can be used to return true or false if the argument can not be validated.strobj
# StrObj
The
StrObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::String object. Theassert_StrObj
function can be used to throw an exception if the argument can not be validated. Theis_StrObj
function can be used to return true or false if the argument can not be validated.strobject
# StrObject
The
StrObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::String object. Theassert_StrObject
function can be used to throw an exception if the argument can not be validated. Theis_StrObject
function can be used to return true or false if the argument can not be validated.strictnum
# StrictNum
The
StrictNum
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_StrictNum
function can be used to throw an exception if the argument can not be validated. Theis_StrictNum
function can be used to return true or false if the argument can not be validated.stringlike
# StringLike
The
StringLike
type constraint is provided by the Types::TypeTiny library. Please see that documentation for more information. Theassert_StringLike
function can be used to throw an exception if the argument can not be validated. Theis_StringLike
function can be used to return true or false if the argument can not be validated.stringobj
# StringObj
The
StringObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::String object. Theassert_StringObj
function can be used to throw an exception if the argument can not be validated. Theis_StringObj
function can be used to return true or false if the argument can not be validated.stringobject
# StringObject
The
StringObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::String object. Theassert_StringObject
function can be used to throw an exception if the argument can not be validated. Theis_StringObject
function can be used to return true or false if the argument can not be validated.strongpassword
# StrongPassword
The
StrongPassword
type constraint is provided by the Types::Common::String library. Please see that documentation for more information. Theassert_StrongPassword
function can be used to throw an exception if the argument can not be validated. Theis_StrongPassword
function can be used to return true or false if the argument can not be validated.structobj
# StructObj
The
StructObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Struct object. Theassert_StructObj
function can be used to throw an exception if the argument can not be validated. Theis_StructObj
function can be used to return true or false if the argument can not be validated.structobject
# StructObject
The
StructObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Struct object. Theassert_StructObject
function can be used to throw an exception if the argument can not be validated. Theis_StructObject
function can be used to return true or false if the argument can not be validated.throwable
# Throwable
The
Throwable
type constraint is provided by this library and accepts any object that is a consumer of the Data::Object::Role::Throwable role. Theassert_Throwable
function can be used to throw an exception if the argument can not be validated. Theis_Throwable
function can be used to return true or false if the argument can not be validated.tied
# Tied["MyClass"]
The
Tied
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Tied
function can be used to throw an exception if the argument can not be validated. Theis_Tied
function can be used to return true or false if the argument can not be validated.tuple
# Tuple[Int, Str, Str]
The
Tuple
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Tuple
function can be used to throw an exception if the argument can not be validated. Theis_Tuple
function can be used to return true or false if the argument can not be validated.typetiny
# TypeTiny
The
TypeTiny
type constraint is provided by the Types::TypeTiny library. Please see that documentation for more information. Theassert_TypeTiny
function can be used to throw an exception if the argument can not be validated. Theis_TypeTiny
function can be used to return true or false if the argument can not be validated.undef
# Undef
The
Undef
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Undef
function can be used to throw an exception if the argument can not be validated. Theis_Undef
function can be used to return true or false if the argument can not be validated.undefobj
# UndefObj
The
UndefObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Undef object. Theassert_UndefObj
function can be used to throw an exception if the argument can not be validated. Theis_UndefObj
function can be used to return true or false if the argument can not be validated.undefobject
# UndefObject
The
UndefObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Undef object. Theassert_UndefObject
function can be used to throw an exception if the argument can not be validated. Theis_UndefObject
function can be used to return true or false if the argument can not be validated.uppercasesimplestr
# UpperCaseSimpleStr
The
UpperCaseSimpleStr
type constraint is provided by the Types::Common::String library. Please see that documentation for more Theassert_UpperCaseSimpleStr
function can be used to throw an exception if the argument can not be validated. Theis_UpperCaseSimpleStr
function can be used to return true or false if the argument can not be validated. information.uppercasestr
# UpperCaseStr
The
UpperCaseStr
type constraint is provided by the Types::Common::String library. Please see that documentation for more information. Theassert_UpperCaseStr
function can be used to throw an exception if the argument can not be validated. Theis_UpperCaseStr
function can be used to return true or false if the argument can not be validated.value
# Value
The
Value
type constraint is provided by the Types::Standard library. Please see that documentation for more information. Theassert_Value
function can be used to throw an exception if the argument can not be validated. Theis_Value
function can be used to return true or false if the argument can not be validated.varsobj
# VarsObj
The
VarsObj
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Vars object. Theassert_VarsObj
function can be used to throw an exception if the argument can not be validated. Theis_VarsObj
function can be used to return true or false if the argument can not be validated.varsobject
# VarsObject
The
VarsObject
type constraint is provided by this library and accepts any object that is, or is derived from, a Data::Object::Vars object. Theassert_VarsObject
function can be used to throw an exception if the argument can not be validated. Theis_VarsObject
function can be used to return true or false if the argument can not be validated.CREDITS
Al Newkirk,
+319
Anthony Brummett,
+10
Adam Hopkins,
+2
José Joaquín Atria,
+1
AUTHOR
Al Newkirk,
awncorp@cpan.org
LICENSE
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated here, https://github.com/iamalnewkirk/do/blob/master/LICENSE.
PROJECT
SEE ALSO
To get the most out of this distribution, consider reading the following:
Module Install Instructions
To install Do, copy and paste the appropriate command in to your terminal.
cpanm Do
perl -MCPAN -e shell install Do
For more information on module installation, please visit the detailed CPAN module installation guide.