NAME

Data::Object

ABSTRACT

Object-Orientation for Perl 5

SYNOPSIS

package main;

use Data::Object;

my $array = Box Array [1..4];

# my $iterator = $array->iterator;

# $iterator->next; # 1

DESCRIPTION

This package automatically exports and provides constructor functions for creating chainable data type objects from raw Perl data types.

LIBRARIES

This package uses type constraints from:

Data::Object::Types

FUNCTIONS

This package implements the following functions:

args

Args(HashRef $data) : InstanceOf["Data::Object::Args"]

The Args function returns a Data::Object::Args object.

array

Array(ArrayRef $data) : InstanceOf["Data::Object::Array"]

The Array function returns a Data::Object::Box which wraps a Data::Object::Array object.

boolean

Boolean(Bool $data) : BooleanObject

The Boolean function returns a Data::Object::Boolean object representing a true or false value.

box

Box(Any $data) : InstanceOf["Data::Object::Box"]

The Box function returns a Data::Object::Box object representing a data type object which is automatically deduced.

code

Code(CodeRef $data) : InstanceOf["Data::Object::Code"]

The Code function returns a Data::Object::Box which wraps a Data::Object::Code object.

data

Data(Str $file) : InstanceOf["Data::Object::Data"]

The Data function returns a Data::Object::Data object.

error

Error(Str | HashRef) : InstanceOf["Data::Object::Exception"]

The Error function returns a Data::Object::Exception object.

false

False() : BooleanObject

The False function returns a Data::Object::Boolean object representing a false value.

float

Float(Num $data) : InstanceOf["Data::Object::Float"]

The Float function returns a Data::Object::Box which wraps a Data::Object::Float object.

hash

Hash(HashRef $data) : InstanceOf["Data::Object::Hash"]

The Hash function returns a Data::Object::Box which wraps a Data::Object::Hash object.

name

Name(Str $data) : InstanceOf["Data::Object::Name"]

The Name function returns a Name::Object::Name object.

number

Number(Num $data) : InstanceOf["Data::Object::Number"]

The Number function returns a Data::Object::Box which wraps a Data::Object::Number object.

opts

Opts(HashRef $data) : InstanceOf["Data::Object::Opts"]

The Opts function returns a Data::Object::Opts object.

regexp

Regexp(RegexpRef $data) : InstanceOf["Data::Object::Regexp"]

The Regexp function returns a Data::Object::Box which wraps a Data::Object::Regexp object.

scalar

Scalar(Ref $data) : InstanceOf["Data::Object::Scalar"]

The Scalar function returns a Data::Object::Box which wraps a Data::Object::Scalar object.

space

Space(Str $data) : InstanceOf["Data::Object::Space"]

The Space function returns a Data::Object::Space object.

string

String(Str $data) : InstanceOf["Data::Object::String"]

The String function returns a Data::Object::Box which wraps a Data::Object::String object.

struct

Struct(HashRef $data) : InstanceOf["Data::Object::Struct"]

The Struct function returns a Data::Object::Struct object.

true

True() : BooleanObject

The True function returns a Data::Object::Boolean object representing a true value.

undef

Undef() : InstanceOf["Data::Object::Undef"]

The Undef function returns a Data::Object::Undef object representing the undefined value.

vars

Vars() : InstanceOf["Data::Object::Vars"]

The Vars function returns a Data::Object::Vars object representing the available environment variables.

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 in the "license file".

PROJECT

Wiki

Project

Initiatives

Milestones

Contributing

Issues