Venus::Role::Testable

Testable Role

Testable Role for Perl 5

method: is_false method: is_true

package Example;

use Venus::Class;

with 'Venus::Role::Testable';

attr 'value';

sub execute {
  return pop;
}

package main;

my $example = Example->new;

# $example->is_true(sub{0});

This package modifies the consuming package and provides methods for dispatching method calls and returning truthy returns as true and falsy returns as false boolean values.

The is_false method dispatches the method call or executes the callback and returns truthy returns as false and falsy returns as true "boolean" values.

is_false(Str | CodeRef $method, Any @args) (Bool)

{ since => '0.08', }

=example-1 is_false

package main;

my $example = Example->new;

my $true = $example->is_false(execute => 0);

# 1

The is_true method dispatches the method call or executes the callback and returns truthy returns as true and falsy returns as false "boolean" values.

is_true(Str | CodeRef $method, Any @args) (Bool)

{ since => '0.08', }

=example-1 is_true

package main;

my $example = Example->new;

my $true = $example->is_true(execute => 1);

# 1

t/Venus.t: pdml: authors t/Venus.t: pdml: license

17 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 46:

Unknown directive: =synopsis

Around line 77:

Unknown directive: =description

Around line 87:

Unknown directive: =method

Around line 93:

Unknown directive: =signature

Around line 97:

Unknown directive: =metadata

Around line 133:

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

Around line 153:

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

Around line 163:

Unknown directive: =method

Around line 169:

Unknown directive: =signature

Around line 173:

Unknown directive: =metadata

Around line 209:

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

Around line 229:

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

Around line 239:

Unknown directive: =partials