Raisin::Encoder - A helper for Raisin::Middleware::Formatter over encoder modules.
my $enc = Raisin::Encoder->new; $enc->register(xml => 'Some::XML::Formatter'); $enc->for('json'); $enc->media_types_map_flat_hash;
Provides an easy interface to use and register encoders.
Allows user to register their own encoders.
$enc->register(xml => 'Some::XML::Formatter');
Also it can override "builtin" types as the user ones have more precedence.
$enc->register(json => 'My::Own::JSON::Formatter');
Returns a list of encoders which are bundled with Raisin. They are: Raisin::Encoder::JSON, Raisin::Encoder::Text, Raisin::Encoder::YAML.
Returns a list of encoders which were registered by user.
Returns a list of both "builtin" and "users".
Returns a class name for specified format.
Returns a hash of media types and associated formats.
Artur Khabibullin - rtkh <at> cpan.org
This module and all the modules in this package are governed by the same license as Perl itself.
To install Raisin, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Raisin
CPAN shell
perl -MCPAN -e shell install Raisin
For more information on module installation, please visit the detailed CPAN module installation guide.