if ($args{serialize} eq "JSON") {
require JSON::Any;
JSON::Any->import;
my $json = JSON::Any->new;
$self->{serialize} = sub { $json->objToJson( [@_] ) };
$sel
f->{unserialize} = sub { (@{ $json->jsonToObj(@_) })[0] };
} elsif ($args{serialize} eq "Storable") {
require Storable;
$self->{serialize} = sub { Storable::nfreeze( [@_] )};
Any/Dump> and L<YAML::Any/Load> to serialize and deserialize
data.
=item JSON
Use L<JSON::Any/objToJson> and L<JSON::Any/jsonToObj> to serialize and
deserialize.
=item Storable
Use L<Storable/nfre