Data::Object::Struct
Struct Class for Perl 5
package main;
use Data::Object::Struct;
my $person = Data::Object::Struct->new(
fname => 'Aron',
lname => 'Nienow',
cname => 'Jacobs, Sawayn and Nienow'
);
# $person->fname # Aron
# $person->lname # Nienow
# $person->cname # Jacobs, Sawayn and Nienow
# $person->mname
# Error!
# $person->mname = 'Clifton'
# Error!
# $person->{mname} = 'Clifton'
# Error!
Data::Object::Role::Buildable Data::Object::Role::Immutable Data::Object::Role::Proxyable
This package provides a class that creates struct-like objects which bundle attributes together, is immutable, and provides accessors, without having to write an explicit class.
5 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: =synopsis
- Around line 49:
Unknown directive: =integrates
- Around line 57:
Unknown directive: =description