Data-Serializer-Sereal-1.05/0000755000000000000000000000000012371231662014331 5ustar rootrootData-Serializer-Sereal-1.05/META.json0000644000000000000000000000233412371231662015754 0ustar rootroot{ "abstract" : "Creates bridge between Data::Serializer and Sereal", "author" : [ "James Rouzier " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 6.9, CPAN::Meta::Converter version 2.141520", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Data-Serializer-Sereal", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "Data::Serializer" : "0", "Sereal::Decoder" : "0", "Sereal::Encoder" : "0", "Test::More" : "0" } } }, "release_status" : "stable", "resources" : { "repository" : { "type" : "git", "url" : "https://github.com/rouzier/Data-Serializer-Sereal.git", "web" : "https://github.com/rouzier/Data-Serializer-Sereal" } }, "version" : "1.05" } Data-Serializer-Sereal-1.05/t/0000755000000000000000000000000012371231662014574 5ustar rootrootData-Serializer-Sereal-1.05/t/00-load.t0000644000000000000000000000031712356540350016116 0ustar rootroot#!perl -T use Test::More tests => 1; BEGIN { use_ok( 'Data::Serializer::Sereal' ) || print "Bail out! "; } diag( "Testing Data::Serializer::Sereal $Data::Serializer::Sereal::VERSION, Perl $], $^X" ); Data-Serializer-Sereal-1.05/t/pod.t0000644000000000000000000000035012356540350015541 0ustar rootroot#!perl -T use strict; use warnings; use Test::More; # Ensure a recent version of Test::Pod my $min_tp = 1.22; eval "use Test::Pod $min_tp"; plan skip_all => "Test::Pod $min_tp required for testing POD" if $@; all_pod_files_ok(); Data-Serializer-Sereal-1.05/t/pod-coverage.t0000644000000000000000000000104712356540350017336 0ustar rootrootuse strict; use warnings; use Test::More; # Ensure a recent version of Test::Pod::Coverage my $min_tpc = 1.08; eval "use Test::Pod::Coverage $min_tpc"; plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage" if $@; # Test::Pod::Coverage doesn't require a minimum Pod::Coverage version, # but older versions don't recognize some common documentation styles my $min_pc = 0.18; eval "use Pod::Coverage $min_pc"; plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage" if $@; all_pod_coverage_ok(); Data-Serializer-Sereal-1.05/t/manifest.t0000644000000000000000000000042012356540350016563 0ustar rootroot#!perl -T use strict; use warnings; use Test::More; unless ( $ENV{RELEASE_TESTING} ) { plan( skip_all => "Author tests not required for installation" ); } eval "use Test::CheckManifest 0.9"; plan skip_all => "Test::CheckManifest 0.9 required" if $@; ok_manifest(); Data-Serializer-Sereal-1.05/META.yml0000644000000000000000000000124712371231662015606 0ustar rootroot--- abstract: 'Creates bridge between Data::Serializer and Sereal' author: - 'James Rouzier ' build_requires: ExtUtils::MakeMaker: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 6.9, CPAN::Meta::Converter version 2.141520' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Data-Serializer-Sereal no_index: directory: - t - inc requires: Data::Serializer: '0' Sereal::Decoder: '0' Sereal::Encoder: '0' Test::More: '0' resources: repository: https://github.com/rouzier/Data-Serializer-Sereal.git version: '1.05' Data-Serializer-Sereal-1.05/Changes0000644000000000000000000000162312371231616015625 0ustar rootrootRevision history for Data-Serializer-Sereal 1.05 2014-08-08 16:27 Do not initialize the global ENCODER/DECODER Verify if the provided encoder/decoder are valid before using it Added test for thread support 1.04 2014-07-30 16:27 If the default global ENCODER/DECODER are undef the reset them Add thread support 1.03 2014-07-24 15:34 Removed Sereal as a dependency Added Sereal::Encoder and Sereal::Decoder as dependencies Use Sereal::Encoder and Sereal::Decoder directly instead of wrapper module Sereal 1.02 2014-07-17 22:12 Issue with Sereal encoder/decoder not being properly extracted from options updated tests 1.01 2014-07-7 12:51 Added Sereal and Data::Serializer as dependencies Added git repo for Metadata 1.00 2014-07-7 12:00 First version, released on an unsuspecting world. Data-Serializer-Sereal-1.05/README0000644000000000000000000000324512356544227015224 0ustar rootrootNAME Data::Serializer::Sereal - Creates bridge between Data::Serializer and Sereal VERSION Version 1.00 SYNOPSIS Creates bridge between Data::Serializer and Sereal SUBROUTINES/METHODS serialize serialize object/data deserialize deserialize object/data decoder gets the decoder from options or uses the default decoder encoder gets the encoder from options or uses the default encoder AUTHOR James Rouzier, "" BUGS Please report any bugs or feature requests to "bug-data-serializer-sereal at rt.cpan.org", or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT You can find documentation for this module with the perldoc command. perldoc Data::Serializer::Sereal You can also look for information at: * RT: CPAN's request tracker * AnnoCPAN: Annotated CPAN documentation * CPAN Ratings * Search CPAN LICENSE AND COPYRIGHT Copyright 2014 James Rouzier. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information. Data-Serializer-Sereal-1.05/MANIFEST0000644000000000000000000000043412371231662015463 0ustar rootrootChanges MANIFEST Makefile.PL README lib/Data/Serializer/Sereal.pm t/00-load.t t/manifest.t t/pod-coverage.t t/pod.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) Data-Serializer-Sereal-1.05/Makefile.PL0000644000000000000000000000203312364255712016305 0ustar rootrootuse strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'Data::Serializer::Sereal', AUTHOR => q{James Rouzier }, VERSION_FROM => 'lib/Data/Serializer/Sereal.pm', ABSTRACT_FROM => 'lib/Data/Serializer/Sereal.pm', ($ExtUtils::MakeMaker::VERSION >= 6.3002 ? ('LICENSE'=> 'perl') : ()), PL_FILES => {}, PREREQ_PM => { 'Test::More' => 0, 'Sereal::Decoder' => 0, 'Sereal::Encoder' => 0, 'Data::Serializer' => 0, }, META_MERGE => { 'meta-spec' => {version => 2}, resources => { repository => { type => 'git', url => 'https://github.com/rouzier/Data-Serializer-Sereal.git', web => 'https://github.com/rouzier/Data-Serializer-Sereal' }, }, }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'Data-Serializer-Sereal-*' }, ); Data-Serializer-Sereal-1.05/lib/0000755000000000000000000000000012371231662015077 5ustar rootrootData-Serializer-Sereal-1.05/lib/Data/0000755000000000000000000000000012371231662015750 5ustar rootrootData-Serializer-Sereal-1.05/lib/Data/Serializer/0000755000000000000000000000000012371231662020061 5ustar rootrootData-Serializer-Sereal-1.05/lib/Data/Serializer/Sereal.pm0000644000000000000000000000534212371231316021632 0ustar rootrootpackage Data::Serializer::Sereal; use strict; use warnings; use base qw(Data::Serializer); use Sereal::Encoder qw(sereal_encode_with_object); use Sereal::Decoder qw(sereal_decode_with_object); =head1 NAME Data::Serializer::Sereal - Creates bridge between Data::Serializer and Sereal =head1 VERSION Version 1.05 =cut our $VERSION = '1.05'; our $ENCODER; our $DECODER; =head1 SYNOPSIS Creates bridge between Data::Serializer and Sereal =head1 SUBROUTINES/METHODS =head2 serialize serialize object/data =cut sub serialize { my ($self, $object) = @_; return sereal_encode_with_object($self->encoder, $object); } =head2 deserialize deserialize object/data =cut sub deserialize { my ($self) = @_; my $object; sereal_decode_with_object($self->decoder, $_[1], $object); return $object; } =head2 decoder gets the decoder from options or uses the default decoder =cut sub decoder { my ($self) = @_; my $decoder = $self->{options}{decoder}; return $decoder if ref($decoder) eq 'Sereal::Decoder'; return $DECODER ||= Sereal::Decoder->new(); } =head2 encoder gets the encoder from options or uses the default encoder =cut sub encoder { my ($self) = @_; my $encoder = $self->{options}{encoder}; return $encoder if ref($encoder) eq 'Sereal::Encoder'; return $ENCODER ||= Sereal::Encoder->new(); } =head2 Recreates global ENCODER/DECODER after thread is created =cut sub CLONE { $ENCODER = undef; $DECODER = undef; } =head1 AUTHOR James Rouzier, C<< >> =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc Data::Serializer::Sereal You can also look for information at: =over 4 =item * RT: CPAN's request tracker L =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN Ratings L =item * Search CPAN L =back =head1 LICENSE AND COPYRIGHT Copyright 2014 James Rouzier. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information. =cut 1; # End of Data::Serializer::Sereal