https://github.com/awncorp/data-object-role-dumpable
Dumpable Role for Perl 5
https://github.com/awncorp/data-object-role-dumpable
object-oriented perl perl5
Last synced: 10 months ago
JSON representation
Dumpable Role for Perl 5
- Host: GitHub
- URL: https://github.com/awncorp/data-object-role-dumpable
- Owner: awncorp
- License: other
- Created: 2020-10-03T19:05:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-03T20:34:45.000Z (over 5 years ago)
- Last Synced: 2025-02-21T09:19:28.459Z (over 1 year ago)
- Topics: object-oriented, perl, perl5
- Language: Perl
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: CHANGES
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
NAME
Data::Object::Role::Dumpable
ABSTRACT
Dumpable Role for Perl 5
SYNOPSIS
package Example;
use Moo;
with 'Data::Object::Role::Dumpable';
package main;
my $example = Example->new;
# $example->dump
DESCRIPTION
This package provides methods for dumping the object and underlying
value.
METHODS
This package implements the following methods:
dump
dump() : Str
The dump method returns a string representation of the underlying data.
dump example #1
# given: synopsis
my $dumped = $example->dump;
pretty_dump
pretty_dump() : Str
The pretty_dump method returns a string representation of the
underlying data that is human-readable and useful for debugging.
pretty_dump example #1
# given: synopsis
my $dumped = $example->pretty_dump;
pretty_print
pretty_print(Any @args) : Int
The pretty_print method prints a stringified human-readable
representation of the underlying data.
pretty_print example #1
# given: synopsis
my $printed = $example->pretty_print;
pretty_print example #2
# given: synopsis
my $printed = $example->pretty_print({1..4});
pretty_say
pretty_say(Any @args) : Int
The pretty_say method prints a stringified human-readable
representation of the underlying data, with a trailing newline.
pretty_say example #1
# given: synopsis
my $printed = $example->pretty_say;
pretty_say example #2
# given: synopsis
my $printed = $example->pretty_say({1..4});
print
print(Any @args) : Int
The print method prints a stringified representation of the underlying
data.
print example #1
# given: synopsis
my $printed = $example->print;
print example #2
# given: synopsis
my $printed = $example->print({1..4});
say
say(Any @args) : Int
The say method prints a stringified representation of the underlying
data, with a trailing newline.
say example #1
# given: synopsis
my $printed = $example->say;
say example #2
# given: synopsis
my $printed = $example->say({1..4});
AUTHOR
Al Newkirk, awncorp@cpan.org
LICENSE
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"
.
PROJECT
Wiki
Project
Initiatives
Milestones
Contributing
Issues