NAME
Data::Object::Role::Formulatable
ABSTRACT
Formulatable Role for Perl 5
SYNOPSIS
package Test::Person;
use registry;
use routines;
use Data::Object::Class;
use Data::Object::ClassHas;
with 'Data::Object::Role::Formulatable';
has 'fname' => (
is => 'ro',
isa => 'Object',
req => 1
);
has 'dates' => (
is => 'ro',
isa => 'ArrayRef[Object]'
);
sub formulate {
{
fname => 'test/data/str',
dates => 'test/data/str'
}
}
package main;
my $person = Test::Person->new({
fname => 'levi nolan',
dates => ['1587717124', '1587717169']
});
# $person->fname; # Test::Data::Str object
# $person->dates; # Test::Data::Str object(s)
DESCRIPTION
This package provides a mechanism for automatically inflating objects from constructor arguments.
INTEGRATES
This package integrates behaviors from:
LIBRARIES
This package uses type constraints from:
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 terms of the The Apache License, Version 2.0, as elucidated in the "license file".