NAME

Venus::Role::Accessible - Accessible Role

ABSTRACT

Accessible Role for Perl 5

SYNOPSIS

package Example;

use Venus::Class;

with 'Venus::Role::Valuable';
with 'Venus::Role::Accessible';

package main;

my $example = Example->new(value => 'hello, there');

DESCRIPTION

This package modifies the consuming package and provides a value attribute as well as get and set methods for modifying the value.

METHODS

This package provides the following methods:

get

get() (Any)

The get method gets and returns the value.

Since 0.01

get example 1
package main;

my $example = Example->new(value => 'hey, there');

my $get = $example->get;

# "hey, there"

set

set(Any $value) (Any)

The set method set the value and returns the value set.

Since 0.01

set example 1
package main;

my $example = Example->new(value => 'hey, there');

my $set = $example->set('hi, there');

# "hi, there"