NAME
Raisin::Attributes - Simple attributes accessors for Raisin.
SYNOPSIS
use Raisin::Attributes;
has hello => sub { 'hello' };
warn $self->hello;
has 'new';
warn $self->new;
has key => 'value';
warn $self->key;
DESCRIPTION
Simple implementation of attribute accessors.
METHODS
has
This code:
has key => 'value';
Will produce:
sub key {
my ($self, $value) = @_;
$self->{_key} = $value if defined $value;
return $self->{_key} // 'value';
}