Raisin::Attributes - Simple attributes accessors for Raisin.
use Raisin::Attributes; has 'new'; say $self->new; # -> undef has key => 'value'; say $self->key; # -> value
Simple implementation of attribute accessors.
This code:
has key => 'value';
Will produce:
sub key { my ($self, $value) = @_; $self->{key} = $value if defined $value; return $self->{key} // 'value'; }
Artur Khabibullin - rtkh <at> cpan.org
This module and all the modules in this package are governed by the same license as Perl itself.
To install Raisin, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Raisin
CPAN shell
perl -MCPAN -e shell install Raisin
For more information on module installation, please visit the detailed CPAN module installation guide.