Data::Object::Utility
Data-Object Utility Functions
use Data::Object::Utility; my $array = Data::Object::Utility::Deduce []; # Data::Object::Array my $value = Data::Object::Utility::Detract $array; # [,...]
This package provides a suite of utility functions designed to be used internally across core packages.
This package uses type constraints defined by:
Data::Object::Library
This package implements the following functions.
Deduce(Any $arg1) : Any
The Deduce function returns a data type object instance based upon the deduced type of data provided.
Deduce
# given ... Data::Object::Utility::Deduce(...);
DeduceBlessed(Any $arg1) : Int
The DeduceBlessed function returns truthy if the argument is blessed.
DeduceBlessed
# given ... Data::Object::Utility::DeduceBlessed(...);
DeduceDeep(Any $arg1) : Any
The DeduceDeep function returns a data type object. If the data provided is complex, this function traverses the data converting all nested data to objects. Note: Blessed objects are not traversed.
DeduceDeep
# given ... Data::Object::Utility::DeduceDeep(...);
DeduceDefined(Any $arg1) : Int
The DeduceDefined function returns truthy if the argument is defined.
DeduceDefined
# given ... Data::Object::Utility::DeduceDefined(...);
DeduceNumberlike(Any $arg1) : Int
The DeduceNumberlike function returns truthy if the argument is numberlike.
DeduceNumberlike
# given ... Data::Object::Utility::DeduceNumberlike(...);
DeduceReferences(Any $arg1) : Int
The DeduceReferences function returns a data object based on the type of argument reference provided.
DeduceReferences
# given ... Data::Object::Utility::DeduceReferences(...);
DeduceStringLike(Any $arg1) : Int
The DeduceStringLike function returns truthy if the argument is stringlike.
DeduceStringLike
# given ... Data::Object::Utility::DeduceStringLike(...);
Detract(Any $arg1) : Any
The Detract function returns a value of native type, based upon the underlying reference of the data type object provided.
Detract
# given ... Data::Object::Utility::Detract(...);
DetractDeep(Any $arg1) : Any
The DetractDeep function returns a value of native type. If the data provided is complex, this function traverses the data converting all nested data type objects into native values using the objects underlying reference. Note: Blessed objects are not traversed.
DetractDeep
# given ... Data::Object::Utility::DetractDeep(...);
NameFile(Str $arg1) : Str
The NameFile function returns the file representation for a given string.
NameFile
# given ... Data::Object::Utility::NameFile(...);
NameLabel(Str $arg1) : Str
The NameLabel function returns the label representation for a given string.
NameLabel
# given ... Data::Object::Utility::NameLabel(...);
NamePackage(Str $arg1) : Str
The NamePackage function returns the package representation for a give string.
NamePackage
# given ... Data::Object::Utility::NamePackage(...);
NamePath(Str $arg1) : Str
The NamePath function returns the path representation for a given string.
NamePath
# given ... Data::Object::Utility::NamePath(...);
Namespace(Str $arg1) : Str
The Namespace function registers a type library with a namespace in the registry so that typed operations know where to look for type context-specific constraints.
Namespace
# given ... Data::Object::Utility::Namespace(...);
Registry() : Object
The Registry function returns the global Data::Object::Registry object, which holds mappings between namespaces and type registries.
Registry
# given ... Data::Object::Utility::Registry(...);
Reify(Str $namespace, Str $expression) : Maybe[Object]
The Reify function returns a type constraint for a given namespace and expression.
Reify
# given ... Data::Object::Utility::Reify(...);
TypeArray(ArrayRef $arg1) : ArrayObject
The TypeArray function returns a Data::Object::Array instance which wraps the provided data type and can be used to perform operations on the data.
TypeArray
# given ... Data::Object::Utility::TypeArray(...);
TypeCode(CodeRef $arg1) : CodeObject
The TypeCode function returns a Data::Object::Code instance which wraps the provided data type and can be used to perform operations on the data.
TypeCode
# given ... Data::Object::Utility::TypeCode(...);
TypeData(Str $arg1) : Object
The TypeData function returns a Data::Object::Data instance which parses pod-ish data in files and packages.
TypeData
# given ... Data::Object::Utility::TypeData(...);
TypeDispatch(Str $arg1) : Object
The TypeDispatch function return a Data::Object::Dispatch object which is a handle that let's you call into other packages.
TypeDispatch
# given ... Data::Object::Utility::TypeDispatch(...);
TypeException(Any @args) : Object
The TypeException function returns a Data::Object::Exception instance which can be thrown.
TypeException
# given ... Data::Object::Utility::TypeException(...);
TypeFloat(Str $arg1) : FloatObject
The TypeFloat function returns a Data::Object::Float instance which wraps the provided data type and can be used to perform operations on the data.
TypeFloat
# given ... Data::Object::Utility::TypeFloat(...);
TypeHash(HashRef $arg1) : HashObject
The TypeHash function returns a Data::Object::Hash instance which wraps the provided data type and can be used to perform operations on the data.
TypeHash
# given ... Data::Object::Utility::TypeHash(...);
TypeName(Any $arg1) : Str
The TypeName function returns a data type description for the type of data provided, represented as a string in capital letters.
TypeName
# given ... Data::Object::Utility::TypeName(...);
TypeNumber(Num $arg1) : NumObject
The TypeNumber function returns a Data::Object::Number instance which wraps the provided data type and can be used to perform operations on the data.
TypeNumber
# given ... Data::Object::Utility::TypeNumber(...);
TypeRegexp(RegexpRef $arg1) : RegexpObject
The TypeRegexp function returns a Data::Object::Regexp instance which wraps the provided data type and can be used to perform operations on the data.
TypeRegexp
# given ... Data::Object::Utility::TypeRegexp(...);
TypeScalar(Any $arg1) : ScalarObject
The TypeScalar function returns a Data::Object::Scalar instance which wraps the provided data type and can be used to perform operations on the data.
TypeScalar
# given ... Data::Object::Utility::TypeScalar(...);
TypeSpace(Str $arg1) : Object
The TypeSpace function returns a Data::Object::Space instance which provides methods for operating on package and namespaces.
TypeSpace
# given ... Data::Object::Utility::TypeSpace(...);
TypeString(Str $arg1) : StrObject
The TypeString function returns a Data::Object::String instance which wraps the provided data type and can be used to perform operations on the data.
TypeString
# given ... Data::Object::Utility::TypeString(...);
TypeUndef(Undef $arg1) : UndefObject
The TypeUndef function returns a Data::Object::Undef instance which wraps the provided data type and can be used to perform operations on the data.
TypeUndef
# given ... Data::Object::Utility::TypeUndef(...);
Al Newkirk, +319
+319
Anthony Brummett, +10
+10
Adam Hopkins, +2
+2
José Joaquín Atria, +1
+1
Al Newkirk, awncorp@cpan.org
awncorp@cpan.org
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.
Wiki
Project
Initiatives
Milestones
Contributing
Issues
To get the most out of this distribution, consider reading the following:
Do
Data::Object
Data::Object::Class
Data::Object::ClassHas
Data::Object::Role
Data::Object::RoleHas
To install Do, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Do
CPAN shell
perl -MCPAN -e shell install Do
For more information on module installation, please visit the detailed CPAN module installation guide.