NAME
Venus::Dump - Dump Class
ABSTRACT
Dump Class for Perl 5
SYNOPSIS
package main;
use Venus::Dump;
my $dump = Venus::Dump->new(
value => { name => ['Ready', 'Robot'], version => 0.12, stable => !!1, }
);
# $dump->encode;
DESCRIPTION
This package provides methods for reading and writing dumped (i.e. stringified) Perl data.
ATTRIBUTES
This package has the following attributes:
decoder
decoder(CodeRef)
This attribute is read-write, accepts (CodeRef)
values, and is optional.
encoder
encoder(CodeRef)
This attribute is read-write, accepts (CodeRef)
values, and is optional.
INHERITS
This package inherits behaviors from:
INTEGRATES
This package integrates behaviors from:
METHODS
This package provides the following methods:
decode
decode(string $text) (any)
The decode method decodes the Perl string, sets the object value, and returns the decoded value.
Since 0.01
- decode example 1
-
# given: synopsis; my $decode = $dump->decode('{codename=>["Ready","Robot"],stable=>!!1}'); # { codename => ["Ready", "Robot"], stable => 1 }
encode
encode() (string)
The encode method encodes the objects value as a Perl string and returns the encoded string.
Since 0.01
- encode example 1
-
# given: synopsis; my $encode = $dump->encode; # '{name => ["Ready","Robot"], stable => !!1, version => "0.12"}'
AUTHORS
Awncorp, awncorp@cpan.org
LICENSE
Copyright (C) 2022, Awncorp, awncorp@cpan.org
.
This program is free software, you can redistribute it and/or modify it under the terms of the Apache license version 2.0.