Maplat::Helpers::DBSerialize - serialize data structures for saving them into a database text field
use Maplat::Helpers::DBSerialize; my $textstring = dbfreeze($reftodata); my $reftodata = dbthaw($textstring);
This module provides functions to encode data structures in a way so they can be saved to non-binary text strings in databases (like the "text" data type in PostgreSQL).
Internally, it uses Storable and MIME::Base64 to do its job.
Takes one argument, the reference to the data structure to be encoded. Returns a text string.
Takes one argument, a text string encoded by dbfreeze(). Returns a reference to a data structure.
Takes one argument, a scalar that (possibly) needs derefencing. This is a helper function that should(tm) do the right things in most of the cases and return the correctly derefenced scalar. YMMV
Rene Schickbauer, <rene.schickbauer@gmail.com>
Copyright (C) 2008-2011 by Rene Schickbauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
To install Maplat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Maplat
CPAN shell
perl -MCPAN -e shell install Maplat
For more information on module installation, please visit the detailed CPAN module installation guide.