MooseX::Attribute::LazyInflator::Meta::Role::Attribute - Lazy inflate attributes
version 2.2.2
package Test; use Moose; use MooseX::Attribute::LazyInflator; # Load default deflators and inflators use MooseX::Attribute::Deflator::Moose; has hash => ( is => 'rw', isa => 'HashRef', traits => ['LazyInflator'] ); package main; my $obj = Test->new( hash => '{"foo":"bar"}' ); # Attribute 'hash' is being inflated to a HashRef on access $obj->hash;
This role consumes MooseX::Attribute::Deflator::Meta::Role::Attribute.
Returns a true value if the value of the attribute passes the type contraint or has been inflated.
The attribute's value is being inflated and set if it has a value and hasn't been inflated yet.
Will return true if the attribute hasn't been inflated yet.
The accessor metaclass is set to MooseX::Attribute::LazyInflator::Meta::Role::Method::Accessor.
Moritz Onken
This software is Copyright (c) 2012 by Moritz Onken.
This is free software, licensed under:
The (three-clause) BSD License
To install MooseX::Attribute::Deflator, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Attribute::Deflator
CPAN shell
perl -MCPAN -e shell install MooseX::Attribute::Deflator
For more information on module installation, please visit the detailed CPAN module installation guide.