Venus::Role::Dumpable

Dumpable Role

Dumpable Role for Perl 5

method: dump method: dump_pretty

package Example;

use Venus::Class;

attr 'test';

with 'Venus::Role::Dumpable';

package main;

my $example = Example->new(test => 123);

# $example->dump;

This package modifies the consuming package and provides methods for dumping the object or the return value of a dispatched method call.

The dump method returns a string representation of the underlying data. This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method.

dump(string | coderef $method, any @args) (string)

{ since => '0.01', }

=example-1 dump

package main;

my $example = Example->new(test => 123);

my $dump = $example->dump;

# "bless( {test => 123}, 'Example' )"

The dump_pretty method returns a string representation of the underlying data that is human-readable and useful for debugging. This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method.

dump_pretty(string | coderef $method, any @args) (string)

{ since => '0.01', }

=example-1 dump_pretty

package main;

my $example = Example->new(test => 123);

my $dump_pretty = $example->dump_pretty;

# bless( {
#          test => 123
#        }, 'Example' )

t/Venus.t: present: authors t/Venus.t: present: license

13 POD Errors

The following errors were encountered while parsing the POD:

Around line 14:

Unknown directive: =name

Around line 22:

Unknown directive: =tagline

Around line 30:

Unknown directive: =abstract

Around line 38:

Unknown directive: =includes

Around line 47:

Unknown directive: =synopsis

Around line 74:

Unknown directive: =description

Around line 83:

Unknown directive: =method

Around line 89:

Unknown directive: =signature

Around line 93:

Unknown directive: =metadata

Around line 119:

Unknown directive: =method

Around line 126:

Unknown directive: =signature

Around line 130:

Unknown directive: =metadata

Around line 158:

Unknown directive: =partials