Data::Object::Rule

Data-Object Rule Declaration

package Persona;

use Data::Object::Rule;

requires 'id';
requires 'fname';
requires 'lname';
requires 'created';
requires 'updated';

1;

Moo::Role

Data::Object::Library

This package modifies the consuming package making it a role, and is used to allow you to specify rules for the consuming class. There is functionally no difference between a role and a rule, so this concept only exists to differentiate between that which describes an interface (rules) and that which mixes-in behaviors.

+=head1 KEYWORDS

This package provides the following keywords.

+=head2 has

package Person;

use Data::Object 'Class';

has fname => (
  is => 'ro',
  isa => 'Str'
);

has lname => (
  is => 'ro',
  isa => 'Str'
);

1;

The has keyword is used to declare class attributes, which can be accessed and assigned to using the built-in getter/setter or by the object constructor. See Moo for more information.

+=head2 with

package Person;

use Data::Object 'Class';

with 'Employable';

1;

The with keyword is used to declare roles to be used and compose into your role. See Moo for more information.

7 POD Errors

The following errors were encountered while parsing the POD:

Around line 8:

Unknown directive: =name

Around line 12:

Unknown directive: =abstract

Around line 16:

Unknown directive: =synopsis

Around line 30:

Unknown directive: =inherits

Around line 34:

Unknown directive: =libraries

Around line 38:

Unknown directive: =description

Around line 46:

Unknown directive: =headers