NAME
Data::Object
ABSTRACT
Modern Perl Development Framework and Standard Library
SYNOPSIS
package User;
use Data::Object 'Class';
extends 'Identity';
has 'fname';
has 'lname';
1;
DESCRIPTION
The Data::Object package and framework aims to provide a standardized and cohesive set of classes, types, objects, functions, patterns, and tools for jump-starting application development with modern conventions and best practices.
FUNCTIONS
This package implements the following functions.
any
any(Any $arg) : Object
The any
constructor function returns a Data::Object::Any object for given argument.
array
array(ArrayRef $arg) : Object
The array
constructor function returns a Data::Object::Array object for given argument.
code
code(CodeRef $arg) : Object
The code
constructor function returns a Data::Object::Code object for given argument.
exception
exception(HashRef $arg) : Object
The exception
constructor function returns a Data::Object::Exception object for given argument.
- exception example
-
# given { message => 'Oops' } my $object = Data::Object->exception({ message => 'Oops' });
float
float(Num $arg) : Object
The float
constructor function returns a Data::Object::Float object for given argument.
hash
hash(HashRef $arg) : Object
The hash
constructor function returns a Data::Object::Hash object for given argument.
integer
integer(Int $arg) : Object
The integer
constructor function returns a Data::Object::Integer object for given argument.
number
number(Num $arg) : Object
The number
constructor function returns a Data::Object::Number object for given argument.
regexp
regexp(Regexp $arg) : Object
The regexp
constructor function returns a Data::Object::Regexp object for given argument.
scalar
scalar(Any $arg) : Object
The scalar
constructor function returns a Data::Object::Scalar object for given argument.
string
string(Str $arg) : Object
The string
constructor function returns a Data::Object::String object for given argument.
undef
undef(Undef $arg?) : Object
The undef
constructor function returns a Data::Object::Undef object for given argument.
METHODS
This package implements the following methods.
new
new(Str $arg) : Object
The new method expects a string representing a class name under the Data::Object namespace and returns a Data::Object::Space object.