Venus::Role::Doable - Doable Role
Doable Role for Perl 5
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).
This package provides the following methods:
do(Str | CodeRef $method, Any @args) (Self)
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.
Since 0.01
0.01
package main; my $example = Example->new; $example = $example->do(time => time); # bless({ time => 0000000000 }, "Example") # $example->execute;
To install Venus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Venus
CPAN shell
perl -MCPAN -e shell install Venus
For more information on module installation, please visit the detailed CPAN module installation guide.