Venus::Role::Explainable - Explainable Role
Explainable Role for Perl 5
package Example; use Venus::Class; has 'test'; sub explain { "okay" } with 'Venus::Role::Explainable'; package main; my $example = Example->new(test => 123); # $example->explain;
This package modifies the consuming package and provides methods for making the object stringifiable.
This package provides the following methods:
explain() (Any)
The explain method takes no arguments and returns the value to be used in stringification operations.
Since 0.01
0.01
package main; my $example = Example->new(test => 123); my $explain = $example->explain; # "okay"
This package overloads the following operators:
("")
This package overloads the "" operator.
""
example 1
package main; my $example = Example->new(test => 123); my $string = "$example"; # "okay"
(~~)
This package overloads the ~~ operator.
~~
package main; my $example = Example->new(test => 123); my $result = $example ~~ 'okay'; # 1
Cpanery, cpanery@cpan.org
cpanery@cpan.org
Copyright (C) 2021, Cpanery
Read the "license" file.
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.