Group
Extension

Matches 1

Class-Storage ( P/PM/PMORCH/Class-Storage-0.03.tar.gz, PMORCH, 2015; MetaCPAN )
Class-Storage/lib/Class/Storage.pm ( view source; MetaCPAN )
1 SYNOPSIS

This module came into existence out of the need to be able to send I<objects>
over JSON. JSON does not allow any blessed references to be sent by default and
if sent, provides no generic w
ay to resurrect these objects again after
decoding. This can now all be done like this:

    use JSON;
    use Class::Storage qw(packObjects unpackObjects);

    my $object = bless { a => 1 }, 'MyModu
=> 1 }

    print $writeHandle encode_json($packed), "\n";

    # And on the other "side":

    my $jsonString = <$readHandle>;
    my $packed = decode_json($jsonString);
    my $unpackedObject = unpa

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.