
Data::Encoder - Generic interface for perl encoder or serializer

use Data::Encoder;
my $encoder = Data::Encoder->load('JSON');
my $json = $encoder->encode(['foo']);
my $data = $encoder->decode($json);

Data::Encoder is generic interface for perl encoder or serializer
This module is inspired Tiffany
THIS MODULE IS IN ITS BETA QUALITY. THE API IS STOLEN FROM TILT BUT MAY CHANGE IN THE FUTURE.

Data::Encoder.pm acts as a factory for Data::Encoder::* classes, which in turn are the actual adapter classes for each encoder.
Load Data::Encoder::* class if necessary, and create new instance of using the given arguments.
my $encoder = Data::Encoder->load('JSON', +{ utf8 => 1, pretty => 1 });
my $encoder = Data::Encoder->load('+My::Encoder', +{ option => 'foo' });

The module SHOULD have a <new> method.
This method creates a new instance of Data::Encoder module.
The module SHOULD have a <encode> method.
The module SHOULD have a <decod> method.

xaicron <xaicron {at} cpan.org>

zigorou
tokuhirom
kazuhooku

Copyright 2010 - xaicron

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
