Venus::Role::Throwable

Throwable Role

Throwable Role for Perl 5

method: throw

package Example;

use Venus::Class;

with 'Venus::Role::Throwable';

package main;

my $example = Example->new;

# $example->throw;

This package modifies the consuming package and provides a mechanism for throwing context-aware errors (exceptions).

The throw method builds a Venus::Throw object, which can raise errors (exceptions).

throw(Maybe[Str] $package) (Throw)

{ since => '0.01', }

=example-1 throw

package main;

my $example = Example->new;

my $throw = $example->throw;

# bless({ "package" => "Example::Error", ..., }, "Venus::Throw")

# $throw->error;

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 70:

Unknown directive: =description

Around line 79:

Unknown directive: =method

Around line 84:

Unknown directive: =signature

Around line 88:

Unknown directive: =metadata

Around line 117:

Unknown directive: =partials