Venus::Role::Doable
Doable Role
Doable Role for Perl 5
method: do
package Example;
use Venus::Class;
with 'Venus::Role::Doable';
attr 'time';
sub execute {
return;
}
package main;
my $example = Example->new;
# $example->do(time => time)->execute;
This package modifies the consuming package and provides methods for chaining any chainable and non-chainable methods (by ignoring their return values).
The do method dispatches the method call or executes the callback and returns the invocant. This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method.
do(Str | CodeRef $method, Any @args) (Self)
{ since => '0.01', }
=example-1 do
package main;
my $example = Example->new;
$example = $example->do(time => time);
# bless({ time => 0000000000 }, "Example")
# $example->execute;
t/Venus.t: pdml: authors t/Venus.t: pdml: license
10 POD Errors
The following errors were encountered while parsing the POD:
- Around line 13:
Unknown directive: =name
- Around line 21:
Unknown directive: =tagline
- Around line 29:
Unknown directive: =abstract
- Around line 37:
Unknown directive: =includes
- Around line 45:
Unknown directive: =synopsis
- Around line 76:
Unknown directive: =description
- Around line 85:
Unknown directive: =method
- Around line 91:
Unknown directive: =signature
- Around line 95:
Unknown directive: =metadata
- Around line 124:
Unknown directive: =partials