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(string | coderef $method, any @args) (object)

{ 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: present: authors t/Venus.t: present: license

10 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 77:

Unknown directive: =description

Around line 86:

Unknown directive: =method

Around line 92:

Unknown directive: =signature

Around line 96:

Unknown directive: =metadata

Around line 125:

Unknown directive: =partials