Venus::Role::Stashable

Stashable Role

Stashable Role for Perl 5

method: stash

package Example;

use Venus::Class;

with 'Venus::Role::Stashable';

attr 'test';

package main;

my $example = Example->new(test => time);

# $example->stash;

This package modifies the consuming package and provides methods for stashing data within the object. This role differs from Venus::Role::Encaseable in that it obsures the stash but its data is easily accessible without getters and setters, whereas Encaseable provides getters and setters to help obscure the private instance data.

The stash method is used to fetch and stash named values associated with the object. Calling this method without arguments returns all values.

stash(any $key, any $value) (any)

{ since => '0.01', }

=example-1 stash

package main;

my $example = Example->new(test => time);

my $stash = $example->stash;

# {}

t/Venus.t: present: authors t/Venus.t: present: license

12 POD Errors

The following errors were encountered while parsing the POD:

Around line 14:

Unknown directive: =name

Around line 22:

Unknown directive: =tagline

Around line 30:

Unknown directive: =abstract

Around line 38:

Unknown directive: =includes

Around line 46:

Unknown directive: =synopsis

Around line 73:

Unknown directive: =description

Around line 85:

Unknown directive: =method

Around line 90:

Unknown directive: =signature

Around line 94:

Unknown directive: =metadata

Around line 130:

=cut found outside a pod block. Skipping to next block.

Around line 150:

=cut found outside a pod block. Skipping to next block.

Around line 160:

Unknown directive: =partials