NAME

Data::Object::Role

ABSTRACT

Data-Object Role Declaration

SYNOPSIS

package Persona;

use Data::Object::Role;

with 'Relatable';

1;

DESCRIPTION

This package modifies the consuming package making it a role.

INHERITANCE

This package inherits behaviors from:

Moo::Role

INTEGRATIONS

This package integrates behaviors from:

Data::Object::RoleHas

LIBRARIES

This package uses type constraints defined by:

Data::Object::Library

KEYWORDS

This package provides the following keywords.

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.

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.

CREDITS

Al Newkirk, +289

Anthony Brummett, +10

José Joaquín Atria, +1

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 same terms as the Perl 5 programming language system itself.

PROJECT

GitHub

Projects

Milestones

Contributing

Issues

SEE ALSO

To get the most out of this distribution, consider reading the following:

Do

Data::Object

Data::Object::Class

Data::Object::ClassHas

Data::Object::Role

Data::Object::RoleHas

Data::Object::Library