Venus::Kind
Kind Base Class
Kind Base Class for Perl 5
method: assertion method: checksum method: numified method: renew method: safe method: self method: stringified method: trap
package Example;
use Venus::Class;
base 'Venus::Kind';
package main;
my $example = Example->new;
# bless({}, "Example")
This package provides identity and methods common across all Venus classes.
Venus::Role::Assertable Venus::Role::Boxable Venus::Role::Catchable Venus::Role::Comparable Venus::Role::Deferrable Venus::Role::Digestable Venus::Role::Doable Venus::Role::Dumpable Venus::Role::Matchable Venus::Role::Mockable Venus::Role::Patchable Venus::Role::Printable Venus::Role::Reflectable Venus::Role::Serializable Venus::Role::Testable Venus::Role::Throwable Venus::Role::Tryable
The assertion method returns a Venus::Assert object based on the invocant.
assertion() (Venus::Assert)
{ since => '1.23', }
=example-1 assertion
# given: synopsis
package main;
my $assertion = $example->assertion;
# bless({name => "Example"}, "Venus::Assert")
The checksum method returns an md5 hash string representing the stringified object value (or the object itself).
checksum() (string)
{ since => '0.08', }
=example-1 checksum
# given: synopsis;
my $checksum = $example->checksum;
# "859a86eed4b2d97eb7b830b02f06de32"
The numified method returns the numerical representation of the object which is typically the length (or character count) of the stringified object.
numified() (number)
{ since => '0.08', }
=example-1 numified
# given: synopsis;
my $numified = $example->numified;
# 22
The renew method returns a new instance of the invocant by instantiating the underlying class passing all recognized class attributes to the constructor. Note: This method is not analogous to clone, i.e. attributes which are references will be passed to the new object as references.
renew(any @args) (object)
{ since => '1.23', }
=example-1 renew
# given: synopsis
package main;
my $renew = $example->renew;
# bless({}, "Example")
The safe method dispatches the method call or executes the callback and returns the result, supressing warnings and exceptions. If an exception is thrown this method will return undef. This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method.
safe(string | coderef $code, any @args) (any)
{ since => '0.08', }
=example-1 safe
# given: synopsis;
my $safe = $example->safe('class');
# "Example"
The self method returns the invocant.
self() (any)
{ since => '1.23', }
=example-1 self
# given: synopsis
package main;
my $self = $example->self;
# bless({}, "Example")
The stringified method returns the object, stringified (i.e. a dump of the object's value).
stringified() (string)
{ since => '0.08', }
=example-1 stringified
# given: synopsis;
my $stringified = $example->stringified;
# bless({}, 'Example')
The trap method dispatches the method call or executes the callback and returns a tuple (i.e. a 3-element arrayref) with the results, warnings, and exceptions from the code execution. If an exception is thrown, the results (i.e. the 1st-element) will be an empty arrayref. This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method.
trap(string | coderef $code, any @args) (tuple[arrayref, arrayref, arrayref])
{ since => '0.08', }
=example-1 trap
# given: synopsis;
my $result = $example->trap('class');
# ["Example"]
t/Venus.t: present: authors t/Venus.t: present: license
44 POD Errors
The following errors were encountered while parsing the POD:
- Around line 15:
Unknown directive: =name
- Around line 23:
Unknown directive: =tagline
- Around line 31:
Unknown directive: =abstract
- Around line 39:
Unknown directive: =includes
- Around line 54:
Unknown directive: =synopsis
- Around line 78:
Unknown directive: =description
- Around line 86:
Unknown directive: =integrates
- Around line 110:
Unknown directive: =method
- Around line 114:
Unknown directive: =signature
- Around line 118:
Unknown directive: =metadata
- Around line 145:
Unknown directive: =method
- Around line 150:
Unknown directive: =signature
- Around line 154:
Unknown directive: =metadata
- Around line 196:
=cut found outside a pod block. Skipping to next block.
- Around line 206:
Unknown directive: =method
- Around line 211:
Unknown directive: =signature
- Around line 215:
Unknown directive: =metadata
- Around line 257:
=cut found outside a pod block. Skipping to next block.
- Around line 267:
Unknown directive: =method
- Around line 274:
Unknown directive: =signature
- Around line 278:
Unknown directive: =metadata
- Around line 325:
=cut found outside a pod block. Skipping to next block.
- Around line 359:
=cut found outside a pod block. Skipping to next block.
- Around line 382:
Unknown directive: =method
- Around line 389:
Unknown directive: =signature
- Around line 393:
Unknown directive: =metadata
- Around line 427:
=cut found outside a pod block. Skipping to next block.
- Around line 448:
=cut found outside a pod block. Skipping to next block.
- Around line 458:
Unknown directive: =method
- Around line 462:
Unknown directive: =signature
- Around line 466:
Unknown directive: =metadata
- Around line 495:
Unknown directive: =method
- Around line 500:
Unknown directive: =signature
- Around line 504:
Unknown directive: =metadata
- Around line 547:
=cut found outside a pod block. Skipping to next block.
- Around line 557:
Unknown directive: =method
- Around line 566:
Unknown directive: =signature
- Around line 570:
Unknown directive: =metadata
- Around line 602:
=cut found outside a pod block. Skipping to next block.
- Around line 622:
=cut found outside a pod block. Skipping to next block.
- Around line 642:
=cut found outside a pod block. Skipping to next block.
- Around line 665:
=cut found outside a pod block. Skipping to next block.
- Around line 685:
=cut found outside a pod block. Skipping to next block.
- Around line 698:
Unknown directive: =partials