NAME
Venus::Role::Serializable - Serializable Role
ABSTRACT
Serializable Role for Perl 5
SYNOPSIS
package
Example;
use
Venus::Class;
attr
'test'
;
package
main;
my
$example
= Example->new(
test
=> 123);
# $example->serialize;
# {test => 123}
DESCRIPTION
This package provides a mechanism for serializing objects or the return value of a dispatched method call.
METHODS
This package provides the following methods:
serialize
serialize(string | coderef
$code
, any
@args
) (any)
The serialize method serializes the invocant or the return value of a dispatched method call, and returns the result.
Since 1.75
- serialize example 10
-
package
Example10;
attr
'test'
;
package
main;
use
IO::Handle;
my
$example10
= Example10->new(
test
=> IO::Handle->new);
# bless(..., 'Example10')
# my $result = $example10->serialize;
# Exception! (isa Venus::Error) is "on.serialize.deconstruct"
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.