The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Data::Object::Role::Item - Item Object Role for Perl 5

VERSION

version 0.59

SYNOPSIS

    use Data::Object::Class;

    with 'Data::Object::Role::Item';

DESCRIPTION

Data::Object::Role::Item provides routines for operating on Perl 5 data which meet the criteria for being considered items.

METHODS

data

    # given $item

    $item->data; # original value

The data method returns the original and underlying value contained by the object. This method is an alias to the detract method.

detract

    # given $item

    $item->detract; # original value

The detract method returns the original and underlying value contained by the object.

methods

    # given $item

    $item->methods;

The methods method returns the list of methods attached to object. This method returns an array value.

roles

    # given $item

    $item->roles;

The roles method returns the list of roles attached to object. This method returns an array value.

throw

    # given $item

    $item->throw;

The throw method terminates the program using the core die keyword, passing the object to the Data::Object::Exception class as the named parameter object. If captured this method returns an exception value.

type

    # given $item

    $item->type; # ITEM

The type method returns a string representing the internal data type object name. This method returns a string value.

ROLES

This package is comprised of the following roles.

SEE ALSO

AUTHOR

Al Newkirk <anewkirk@ana.io>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Al Newkirk.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.