NAME

Venus::Role::Valuable - Valuable Role

ABSTRACT

Valuable Role for Perl 5

SYNOPSIS

package Example;

use Venus::Class;

with 'Venus::Role::Valuable';

package main;

my $example = Example->new;

# $example->value;

DESCRIPTION

This package modifies the consuming package and provides a value attribute which defaults to what's returned by the default method.

ATTRIBUTES

This package has the following attributes:

value

value(Any)

This attribute is read-write, accepts (Any) values, and is optional.

METHODS

This package provides the following methods:

default

default() (Any)

The default method returns the default value, i.e. undef.

Since 0.01

default example 1
package main;

my $example = Example->new;

my $default = $example->default;

# undef

AUTHORS

Cpanery, cpanery@cpan.org

LICENSE

Copyright (C) 2021, Cpanery

Read the "license" file.