DBIx::Class::InflateColumn::Serializer::CompressJSON - DBIx::Class::InflateColumn::Serializer::CompressJSON - JSON compressed Inflator
version 0.001
DBIx::Class::InflateColumn::Serializer::JSON - CompressJSON Inflator =head1 SYNOPSIS
package MySchema::Table; use base 'DBIx::Class'; __PACKAGE__->load_components('InflateColumn::Serializer', 'Core'); __PACKAGE__->add_columns( 'data_column' => { 'data_type' => 'VARCHAR', 'size' => 255, 'serializer_class' => 'CompressJSON' } ); Then in your code... my $struct = { 'I' => { 'am' => 'a struct' }; $obj->data_column($struct); $obj->update; And you can recover your data structure with: my $obj = ...->find(...); my $struct = $obj->data_column;
The data structures you assign to "data_column" will be saved in the database in JSON format.
Called by DBIx::Class::InflateColumn::Serializer to get the routine that serializes the data passed to it. Returns a coderef.
Called by DBIx::Class::InflateColumn::Serializer to get the routine that deserializes the data stored in the column. Returns a coderef.
Baptiste FOSSÉ <baptiste@weborama.com>
This software is copyright (c) 2012 by Weborama. No license is granted to other entities.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'FOSSÉ'. Assuming UTF-8
To install DBIx::Class::InflateColumn::Serializer::CompressJSON, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::InflateColumn::Serializer::CompressJSON
CPAN shell
perl -MCPAN -e shell install DBIx::Class::InflateColumn::Serializer::CompressJSON
For more information on module installation, please visit the detailed CPAN module installation guide.