Data::Object::Role::Stashable
Stashable Role for Perl 5
package Example; use Moo; with 'Data::Object::Role::Stashable'; package main; my $example = Example->new;
This package provides methods for stashing data within the object.
This package implements the following methods:
stash(Maybe[Str] $key, Maybe[Any] $value) : Any
The stash method is used to fetch and stash named values associated with the object. Calling this method without arguments returns all values.
# given: synopsis my $result = $example->stash; [$result, $example]
# given: synopsis my $result = $example->stash(time => time); [$result, $example]
# given: synopsis my $result = $example->stash('time'); [$result, $example]
Al Newkirk, awncorp@cpan.org
awncorp@cpan.org
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".
Wiki
Project
Initiatives
Milestones
Contributing
Issues
To install Data::Object::Role::Stashable, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Object::Role::Stashable
CPAN shell
perl -MCPAN -e shell install Data::Object::Role::Stashable
For more information on module installation, please visit the detailed CPAN module installation guide.