Data::Object::Class
Class Builder for Perl 5
Moo
package Identity;
use Data::Object::Class;
package main;
my $id = Identity->new;
This package modifies the consuming package making it a class.
This package supports the extends keyword, which is used to declare superclasses your class will inherit from. See Moo for more information.
# given: synopsis
package Person;
use Data::Object::Class;
extends 'Identity';
package main;
my $person = Person->new;
This package supports the has keyword, which 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.
# given: synopsis
package Person;
use Data::Object::Class;
has name => (
is => 'ro'
);
package main;
my $person = Person->new(name => '...');
This package supports the with keyword, which is used to declare roles to be used and compose into your class. See Moo for more information.
# given: synopsis
package Employable;
use Moo::Role;
package Person;
use Data::Object::Class;
with 'Employable';
package main;
my $person = Person->new;
11 POD Errors
The following errors were encountered while parsing the POD:
- Around line 10:
Unknown directive: =name
- Around line 16:
Unknown directive: =abstract
- Around line 22:
Unknown directive: =inherits
- Around line 28:
Unknown directive: =synopsis
- Around line 40:
Unknown directive: =description
- Around line 46:
Unknown directive: =scenario
- Around line 51:
Unknown directive: =example
- Around line 67:
Unknown directive: =scenario
- Around line 73:
Unknown directive: =example
- Around line 91:
Unknown directive: =scenario
- Around line 96:
Unknown directive: =example