Venus::Role::Throwable - Throwable Role
Throwable Role for Perl 5
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).
This package provides the following methods:
throw(Maybe[Str] $package) (Throw)
The throw method builds a Venus::Throw object, which can raise errors (exceptions).
Since 0.01
0.01
package main; my $example = Example->new; my $throw = $example->throw; # bless({ "package" => "Example::Error", ..., }, "Venus::Throw") # $throw->error;
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.