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

NAME

EntityModel::Support::Perl - language support for EntityModel

VERSION

version 0.016

SYNOPSIS

See EntityModel.

DESCRIPTION

Generate Perl packages and methods based on an entity model definition. See EntityModel.

ASYNCHRONOUS MODE

METHODS

setup

apply_entity

ensure_loaded

package_name

Generate the package name string from the given entity.

entity_name

Generate the entity name string from the given package name.

create_field

Create new field for the given entity.

recurse_packages

EntityModel::ObjectBase::Test -> test EntityModel::ObjectBase::Test::One -> test_one EntityModel::ObjectBase::Test::Two -> test_two

load_package

default_accessor

Regular accessor.

Returns a coderef which can act as an accessor, e.g. $ref->($self, $value).

timestamp_accessor

Accessor for timestamp values.

Returns a coderef which can act as an accessor, e.g. $ref->($self, $value).

Accessor accepts the following input formats:

  • DateTime - a DateTime object (or subclassed variant)

  • Epoch time - numeric value containing seconds since epoch

  • String - standard date/time string in ISO8601 format.

ref_accessor

Accessor for reference fields.

Returns a coderef which can act as an accessor, e.g. $ref->($self, $value).

AUTHOR

Tom Molesworth <cpan@entitymodel.com>

LICENSE

Copyright Tom Molesworth 2008-2011. Licensed under the same terms as Perl itself.