Commit ab15449e authored by Gunnar Wolf's avatar Gunnar Wolf

[svn-upgrade] Integrating new upstream version, libdata-serializer-perl (0.43)

parent f59107ca
use Module::Build;
my $build = Module::Build->new
(
module_name => 'Data::Serializer',
dist_author => 'Neil Neely (neil@neely.cx)',
license => 'perl',
build_class => 'Module::Build',
requires => {
'Exporter' => 0,
'AutoLoader' => 0,
'IO::File' => 0,
'Digest::SHA' => 0,
'Data::Dumper' => 2.08,
},
build_requires => {
'AutoSplit' => 0,
'IO::File' => 0,
'Test::More' => 0,
'File::Spec' => 0,
},
recommends => {
'Crypt::CBC' => 0,
'Crypt::Blowfish' => 0,
'Data::Denter' => 0,
'Data::Taxi' => 0,
'Storable' => 0,
'FreezeThaw' => 0,
'Config::General' => 0,
'YAML' => 0,
'YAML::Syck' => 0,
'PHP::Serialization' => 0,
'JSON' => 0,
'JSON::Syck' => 0,
'XML::Simple' => 0,
'XML::Dumper' => 0,
'Compress::Zlib' => 0,
'Compress::PPMd' => 0,
'MIME::Base64' => 0,
},
autosplit => 'lib/Data/Serializer.pm',
);
$build->create_build_script;
Revision history for Perl extension Data::Serializer
0.43 Wed Dec 19 2007
- Converted to utilizing Module::Build to support recommended options
- Added recommended module list
- Added build_requires list
- Added use warnings calls to all modules
- Patched to support JSON 2 by Makamaka <makamaka@donzoko.net> (Thanks Makamaka!)
- Removed Autoloader from sub-modules
-sub modules are tiny two method affairs that really don't need autosplit - and Module::Build makes it a pain
- Removed 'require Exporter' from sub modules, as they weren't using them in anyway (just cleaning up)
0.42 Fri Oct 26 2007
- Added support for Compress::PPMd
Thanks to Strzelecki Łukasz <strzelecki@rswsystems.pl> for recommending the addition
......
......@@ -2,6 +2,7 @@ Changes
MANIFEST
README
INSTALL
Build.PL
Makefile.PL
lib/Data/Serializer.pm
lib/Data/Serializer/Storable.pm
......
--- #YAML:1.0
name: Data-Serializer
version: 0.42
abstract: ~
license: perl
generated_by: ExtUtils::MakeMaker version 6.36
distribution_type: module
requires:
Data::Dumper: 2.08
Digest::SHA: 0
IO::File: 0
Test::More: 0
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.2.html
version: 1.2
---
name: Data-Serializer
version: 0.43
author:
- Neil Neely (neil@neely.cx)
- Neil Neely (neil@neely.cx)
abstract: Modules that serialize data structures
license: perl
resources:
license: http://dev.perl.org/licenses/
requires:
AutoLoader: 0
Data::Dumper: 2.08
Digest::SHA: 0
Exporter: 0
IO::File: 0
build_requires:
AutoSplit: 0
File::Spec: 0
IO::File: 0
Test::More: 0
recommends:
Compress::PPMd: 0
Compress::Zlib: 0
Config::General: 0
Crypt::Blowfish: 0
Crypt::CBC: 0
Data::Denter: 0
Data::Taxi: 0
FreezeThaw: 0
JSON: 0
JSON::Syck: 0
MIME::Base64: 0
PHP::Serialization: 0
Storable: 0
XML::Dumper: 0
XML::Simple: 0
YAML: 0
YAML::Syck: 0
provides:
Data::Serializer:
file: lib/Data/Serializer.pm
version: 0.43
Data::Serializer::Config::General:
file: lib/Data/Serializer/Config/General.pm
version: 0.02
Data::Serializer::Cookbook:
file: lib/Data/Serializer/Cookbook.pm
version: 0.03
Data::Serializer::Data::Denter:
file: lib/Data/Serializer/Data/Denter.pm
version: 0.02
Data::Serializer::Data::Dumper:
file: lib/Data/Serializer/Data/Dumper.pm
version: 0.05
Data::Serializer::Data::Taxi:
file: lib/Data/Serializer/Data/Taxi.pm
version: 0.02
Data::Serializer::FreezeThaw:
file: lib/Data/Serializer/FreezeThaw.pm
version: 0.02
Data::Serializer::JSON:
file: lib/Data/Serializer/JSON.pm
version: 0.02
Data::Serializer::JSON::Syck:
file: lib/Data/Serializer/JSON/Syck.pm
version: 0.02
Data::Serializer::PHP::Serialization:
file: lib/Data/Serializer/PHP/Serialization.pm
version: 0.02
Data::Serializer::Storable:
file: lib/Data/Serializer/Storable.pm
version: 0.03
Data::Serializer::XML::Dumper:
file: lib/Data/Serializer/XML/Dumper.pm
version: 0.02
Data::Serializer::XML::Simple:
file: lib/Data/Serializer/XML/Simple.pm
version: 0.02
Data::Serializer::YAML:
file: lib/Data/Serializer/YAML.pm
version: 0.02
Data::Serializer::YAML::Syck:
file: lib/Data/Serializer/YAML/Syck.pm
version: 0.02
generated_by: Module::Build version 0.2808
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.2.html
version: 1.2
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
#
WriteMakefile(
'NAME' => 'Data::Serializer',
'DISTNAME' => 'Data-Serializer',
'VERSION_FROM' => 'lib/Data/Serializer.pm', # finds $VERSION
'AUTHOR' => 'Neil Neely (neil@neely.cx)',
'LICENSE' => 'perl',
'PREREQ_PM' => {
'IO::File' => 0,
'Digest::SHA' => 0,
'Data::Dumper' => 2.08,
'Test::More' => 0,
},
'dist' => {'COMPRESS'=>'gzip -9f', 'SUFFIX' => 'gz',
'ZIP'=>'/usr/bin/zip','ZIPFLAGS'=>'-rl'}
);
use Module::Build::Compat;
Module::Build::Compat->run_build_pl(args => \@ARGV);
Module::Build::Compat->write_makefile(build_class => 'Module::Build');
package Data::Serializer;
use warnings;
use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
......@@ -17,7 +18,7 @@ require AutoLoader;
@EXPORT = qw( );
@EXPORT_OK = qw( );
$VERSION = '0.42';
$VERSION = '0.43';
# Preloaded methods go here.
{
......
package Data::Serializer::Config::General;
BEGIN { @Data::Serializer::Config::General::ISA = qw(Data::Serializer) }
use warnings;
use strict;
use Config::General;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
require Exporter;
require AutoLoader;
@ISA = qw(Exporter AutoLoader);
@EXPORT = qw();
$VERSION = '0.01';
use vars qw($VERSION @ISA);
$VERSION = '0.02';
sub options {
return (shift)->{options};
}
sub serialize {
my $self = (shift);
my $ref = (shift);
......
......@@ -5,7 +5,7 @@ use warnings;
use strict;
use vars ('$VERSION');
$VERSION = '0.02';
$VERSION = '0.03';
1;
......
package Data::Serializer::Data::Denter;
BEGIN { @Data::Serializer::Data::Denter::ISA = qw(Data::Serializer) }
use warnings;
use strict;
use Carp;
use Data::Denter;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
use vars qw($VERSION @ISA);
require Exporter;
require AutoLoader;
$VERSION = '0.02';
@ISA = qw(Exporter AutoLoader);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
@EXPORT = qw(
);
$VERSION = '0.01';
#
# Create a Data::Denter serializer object.
#
sub serialize {
my $self = shift;
my ($val) = @_;
return undef unless defined $val;
return $val unless ref($val);
return Data::Denter::Indent($val);
}
# Preloaded methods go here.
# Autoload methods go after =cut, and are processed by the autosplit program.
sub deserialize {
my $self = shift;
my ($val) = @_;
return undef unless defined $val;
return Data::Denter::Undent($val);
}
1;
__END__
# Below is the stub of documentation for your module. You better edit it!
#
=head1 NAME
......@@ -42,6 +49,15 @@ Data::Serializer::Data::Denter - Creates bridge between Data::Serializer and Dat
Module is used internally to Data::Serializer
=over 4
=item B<serialize> - Wrapper to normalize serializer method name
=item B<deserialize> - Wrapper to normalize deserializer method name
=back
=head1 AUTHOR
Neil Neely <neil@neely.cx>
......@@ -58,23 +74,3 @@ perl(1), Data::Serializer(3), Data::Denter(3).
=cut
#
# Create a Data::Denter serializer object.
#
sub serialize {
my $self = shift;
my ($val) = @_;
return undef unless defined $val;
return $val unless ref($val);
return Data::Denter::Indent($val);
}
sub deserialize {
my $self = shift;
my ($val) = @_;
return undef unless defined $val;
return Data::Denter::Undent($val);
}
package Data::Serializer::Data::Dumper;
BEGIN { @Data::Serializer::Data::Dumper::ISA = qw(Data::Serializer) }
use warnings;
use strict;
use Carp;
use Data::Dumper;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
require Exporter;
require AutoLoader;
@ISA = qw(Exporter AutoLoader);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
@EXPORT = qw(
);
$VERSION = '0.04';
# Preloaded methods go here.
use vars qw($VERSION @ISA);
# Autoload methods go after =cut, and are processed by the autosplit program.
1;
__END__
# Below is the stub of documentation for your module. You better edit it!
$VERSION = '0.05';
=head1 NAME
Data::Serializer::Data::Dumper - Creates bridge between Data::Serializer and Data::Dumper
=head1 SYNOPSIS
use Data::Serializer::Data::Dumper;
=head1 DESCRIPTION
Module is used internally to Data::Serializer
=head1 AUTHOR
Neil Neely <neil@neely.cx>
=head1 COPYRIGHT
Copyright 2001 by Neil Neely. All rights reserved.
This program is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.
=head1 SEE ALSO
perl(1), Data::Serializer(3), Data::Dumper(3).
=cut
#
# Create a Data::Dumper serializer object.
......@@ -97,3 +52,48 @@ sub deserialize {
{
local $Data::Dumper::Terse;
}
1;
__END__
#
=head1 NAME
Data::Serializer::Data::Dumper - Creates bridge between Data::Serializer and Data::Dumper
=head1 SYNOPSIS
use Data::Serializer::Data::Dumper;
=head1 DESCRIPTION
Module is used internally to Data::Serializer
=head1 METHODS
=over 4
=item B<serialize> - Wrapper to normalize serializer method name
=item B<deserialize> - Wrapper to normalize deserializer method name
=back
=head1 AUTHOR
Neil Neely <neil@neely.cx>
=head1 COPYRIGHT
Copyright 2001 by Neil Neely. All rights reserved.
This program is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.
=head1 SEE ALSO
perl(1), Data::Serializer(3), Data::Dumper(3).
=cut
package Data::Serializer::Data::Taxi;
BEGIN { @Data::Serializer::Data::Taxi::ISA = qw(Data::Serializer) }
use warnings;
use strict;
use Data::Taxi;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
use vars qw($VERSION @ISA);
$VERSION = '0.02';
require Exporter;
require AutoLoader;
@ISA = qw(Exporter AutoLoader);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
@EXPORT = qw(
);
$VERSION = '0.01';
sub serialize {
return Data::Taxi::freeze($_[1]);
}
sub deserialize {
my ($obj) = Data::Taxi::thaw($_[1]);
return $obj;
}
# Preloaded methods go here.
# Autoload methods go after =cut, and are processed by the autosplit program.
1;
__END__
# Below is the stub of documentation for your module. You better edit it!
#
=head1 NAME
......@@ -39,6 +36,15 @@ Data::Serializer::Data::Taxi - Creates bridge between Data::Serializer and Data:
Module is used internally to Data::Serializer
=over 4
=item B<serialize> - Wrapper to normalize serializer method name
=item B<deserialize> - Wrapper to normalize deserializer method name
=back
=head1 AUTHOR
Neil Neely <neil@neely.cx>
......@@ -54,12 +60,3 @@ Neil Neely <neil@neely.cx>
perl(1), Data::Serializer(3), Data::Taxi(3).
=cut
sub serialize {
return Data::Taxi::freeze($_[1]);
}
sub deserialize {
my ($obj) = Data::Taxi::thaw($_[1]);
return $obj;
}
package Data::Serializer::FreezeThaw;
BEGIN { @Data::Serializer::FreezeThaw::ISA = qw(Data::Serializer) }
use warnings;
use strict;
use FreezeThaw;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
require Exporter;
require AutoLoader;
use vars qw($VERSION @ISA);
@ISA = qw(Exporter AutoLoader);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
@EXPORT = qw(
);
$VERSION = '0.01';
$VERSION = '0.02';
# Preloaded methods go here.
sub serialize {
return FreezeThaw::freeze($_[1]);
}
# Autoload methods go after =cut, and are processed by the autosplit program.
sub deserialize {
my ($obj) = FreezeThaw::thaw($_[1]);
return $obj;
}
1;
__END__
# Below is the stub of documentation for your module. You better edit it!
#
=head1 NAME
......@@ -39,6 +34,15 @@ Data::Serializer::FreezeThaw - Creates bridge between Data::Serializer and Freez
Module is used internally to Data::Serializer
=over 4
=item B<serialize> - Wrapper to normalize serializer method name
=item B<deserialize> - Wrapper to normalize deserializer method name
=back
=head1 AUTHOR
Neil Neely <neil@neely.cx>
......@@ -55,11 +59,3 @@ perl(1), Data::Serializer(3), FreezeThaw(3).
=cut
sub serialize {
return FreezeThaw::freeze($_[1]);
}
sub deserialize {
my ($obj) = FreezeThaw::thaw($_[1]);
return $obj;
}
package Data::Serializer::JSON;
BEGIN { @Data::Serializer::JSON::ISA = qw(Data::Serializer) }
use warnings;
use strict;
use JSON;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
use vars qw($VERSION @ISA);
require Exporter;
require AutoLoader;
$VERSION = '0.02';
@ISA = qw(Exporter AutoLoader);
@EXPORT = qw(
sub serialize {
return JSON->VERSION < 2 ? JSON->new->objToJson($_[1]) : JSON->new->encode($_[1]);
}
);
$VERSION = '0.01';
sub deserialize {
return JSON->VERSION < 2 ? JSON->new->jsonToObj($_[1]) : JSON->new->decode($_[1]);
}
1;
__END__
sub serialize {
return JSON->new->objToJson($_[1]);
}
sub deserialize {
return JSON->new->jsonToObj($_[1]);
}
=head1 NAME
......@@ -50,6 +46,8 @@ Module is used internally to Data::Serializer
Naoya Ito <naoya@bloghackers.net>
Patch to JSON 2 by Makamaka <makamaka@donzoko.net>
=head1 COPYRIGHT
This program is free software; you can redistribute it
......
package Data::Serializer::JSON::Syck;
BEGIN { @Data::Serializer::JSON::Syck::ISA = qw(Data::Serializer) }
use warnings;
use strict;
use JSON::Syck;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
use vars qw($VERSION @ISA);
require Exporter;
require AutoLoader;
$VERSION = '0.02';
@ISA = qw(Exporter AutoLoader);
@EXPORT = qw(
);
$VERSION = '0.01';
sub serialize {
return JSON::Syck::Dump($_[1]);
}
sub deserialize {
return JSON::Syck::Load($_[1]);
}
1;
__END__
......@@ -29,6 +31,15 @@ Data::Serializer::JSON::Syck - Creates bridge between Data::Serializer and JSON:
Module is used internally to Data::Serializer
=over 4
=item B<serialize> - Wrapper to normalize serializer method name
=item B<deserialize> - Wrapper to normalize deserializer method name
=back
=head1 AUTHOR
Naoya Ito <naoya@bloghackers.net>
......@@ -44,10 +55,3 @@ perl(1), Data::Serializer(3), JSON::Syck(3).
=cut
sub serialize {
return JSON::Syck::Dump($_[1]);
}
sub deserialize {
return JSON::Syck::Load($_[1]);
}
package Data::Serializer::PHP::Serialization;
BEGIN { @Data::Serializer::PHP::Serialization::ISA = qw(Data::Serializer) }
use warnings;
use strict;
use PHP::Serialization qw();
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
use vars qw($VERSION @ISA);
require Exporter;
require AutoLoader;
$VERSION = '0.02';
@ISA = qw(Exporter AutoLoader);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
@EXPORT = qw(
);
$VERSION = '0.01';
sub serialize {
return PHP::Serialization::serialize($_[1]);
}
sub deserialize {
return PHP::Serialization::unserialize($_[1]);
}
# Preloaded methods go here.
# Autoload methods go after =cut, and are processed by the autosplit program.
1;
__END__
# Below is the stub of documentation for your module. You better edit it!
#
=head1 NAME
......@@ -39,6 +35,15 @@ Data::Serializer::PHP::Serialization - Creates bridge between Data::Serializer a
Module is used internally to Data::Serializer
=over 4
=item B<serialize> - Wrapper to normalize serializer method name
=item B<deserialize> - Wrapper to normalize deserializer method name
=back
=head1 AUTHOR
Neil Neely <neil@neely.cx>
......@@ -55,11 +60,3 @@ perl(1), Data::Serializer(3), PHP::Serialization(3).