Data::Object::Role::Dumpable
Dumpable Role for Perl 5
package Example; use Moo; with 'Data::Object::Role::Dumpable'; package main; my $example = Example->new; # $example->dump
This package provides methods for dumping the object and underlying value.
This package implements the following methods:
dump() : Str
The dump method returns a string representation of the underlying data.
# given: synopsis my $dumped = $example->dump;
pretty_dump() : Str
The pretty_dump method returns a string representation of the underlying data that is human-readable and useful for debugging.
# given: synopsis my $dumped = $example->pretty_dump;
pretty_print(Any @args) : Int
The pretty_print method prints a stringified human-readable representation of the underlying data.
# given: synopsis my $printed = $example->pretty_print;
# given: synopsis my $printed = $example->pretty_print({1..4});
pretty_say(Any @args) : Int
The pretty_say method prints a stringified human-readable representation of the underlying data, with a trailing newline.
# given: synopsis my $printed = $example->pretty_say;
# given: synopsis my $printed = $example->pretty_say({1..4});
print(Any @args) : Int
The print method prints a stringified representation of the underlying data.
# given: synopsis my $printed = $example->print;
# given: synopsis my $printed = $example->print({1..4});
say(Any @args) : Int
The say method prints a stringified representation of the underlying data, with a trailing newline.
# given: synopsis my $printed = $example->say;
# given: synopsis my $printed = $example->say({1..4});
Al Newkirk, awncorp@cpan.org
awncorp@cpan.org
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".
Wiki
Project
Initiatives
Milestones
Contributing
Issues
To install Data::Object::Role::Dumpable, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Object::Role::Dumpable
CPAN shell
perl -MCPAN -e shell install Data::Object::Role::Dumpable
For more information on module installation, please visit the detailed CPAN module installation guide.