r53261 - in /branches/upstream/libmldbm-perl/current: Changes MANIFEST META.yml Makefile.PL README lib/MLDBM.pm t/storable.t t/storable_dbfile.t
hertzog at users.alioth.debian.org
hertzog at users.alioth.debian.org
Tue Feb 23 12:59:56 UTC 2010
Author: hertzog
Date: Tue Feb 23 12:59:03 2010
New Revision: 53261
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53261
Log:
[svn-upgrade] Integrating new upstream version, libmldbm-perl (2.02)
Added:
branches/upstream/libmldbm-perl/current/META.yml
branches/upstream/libmldbm-perl/current/t/storable_dbfile.t
Modified:
branches/upstream/libmldbm-perl/current/Changes
branches/upstream/libmldbm-perl/current/MANIFEST
branches/upstream/libmldbm-perl/current/Makefile.PL
branches/upstream/libmldbm-perl/current/README
branches/upstream/libmldbm-perl/current/lib/MLDBM.pm
branches/upstream/libmldbm-perl/current/t/storable.t
Modified: branches/upstream/libmldbm-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmldbm-perl/current/Changes?rev=53261&op=diff
==============================================================================
--- branches/upstream/libmldbm-perl/current/Changes (original)
+++ branches/upstream/libmldbm-perl/current/Changes Tue Feb 23 12:59:03 2010
@@ -5,6 +5,12 @@
=head1 DESCRIPTION
=over 8
+
+=item 2.02 (19 Feb 2010, by Alexandr Ciornii)
+
+New tests added.
+
+Distribution upgraded
=item 2.01 (07 July 2002)
Modified: branches/upstream/libmldbm-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmldbm-perl/current/MANIFEST?rev=53261&op=diff
==============================================================================
--- branches/upstream/libmldbm-perl/current/MANIFEST (original)
+++ branches/upstream/libmldbm-perl/current/MANIFEST Tue Feb 23 12:59:03 2010
@@ -10,3 +10,5 @@
t/dumper.t
t/freezethaw.t
t/storable.t
+t/storable_dbfile.t
+META.yml Module meta-data (added by MakeMaker)
Added: branches/upstream/libmldbm-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmldbm-perl/current/META.yml?rev=53261&op=file
==============================================================================
--- branches/upstream/libmldbm-perl/current/META.yml (added)
+++ branches/upstream/libmldbm-perl/current/META.yml Tue Feb 23 12:59:03 2010
@@ -1,0 +1,24 @@
+--- #YAML:1.0
+name: MLDBM
+version: 2.02
+abstract: ~
+author: []
+license: perl
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ Test::More: 0
+requires:
+ Data::Dumper: 2.08
+ perl: 5.004
+resources:
+ repository: git://github.com/chorny/MLDBM.git
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.56
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: branches/upstream/libmldbm-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmldbm-perl/current/Makefile.PL?rev=53261&op=diff
==============================================================================
--- branches/upstream/libmldbm-perl/current/Makefile.PL (original)
+++ branches/upstream/libmldbm-perl/current/Makefile.PL Tue Feb 23 12:59:03 2010
@@ -1,8 +1,45 @@
+use 5.004;
use ExtUtils::MakeMaker;
-WriteMakefile(
- NAME => "MLDBM",
- DISTNAME => "MLDBM",
- VERSION_FROM => 'lib/MLDBM.pm',
- PREREQ_PM => { Data::Dumper => '2.08' },
- 'dist' => {COMPRESS=>'gzip -9f', SUFFIX => 'gz'}
- );
+WriteMakefile1(
+ NAME => "MLDBM",
+ DISTNAME => "MLDBM",
+ VERSION_FROM => 'lib/MLDBM.pm',
+ PREREQ_PM => {
+ 'Data::Dumper' => '2.08',
+ },
+ 'dist' => {COMPRESS=>'gzip -9f', SUFFIX => 'gz'},
+ 'LICENSE' => 'perl',
+ MIN_PERL_VERSION => '5.004',
+ META_MERGE => {
+ resources => {
+ repository => 'git://github.com/chorny/MLDBM.git',
+ },
+ },
+ BUILD_REQUIRES => {
+ 'Test::More' => 0,
+ },
+);
+
+sub WriteMakefile1 { #Written by Alexandr Ciornii, version 0.21. Added by eumm-upgrade.
+ my %params=@_;
+ my $eumm_version=$ExtUtils::MakeMaker::VERSION;
+ $eumm_version=eval $eumm_version;
+ die "EXTRA_META is deprecated" if exists $params{EXTRA_META};
+ die "License not specified" if not exists $params{LICENSE};
+ if ($params{BUILD_REQUIRES} and $eumm_version < 6.5503) {
+ #EUMM 6.5502 has problems with BUILD_REQUIRES
+ $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} };
+ delete $params{BUILD_REQUIRES};
+ }
+ delete $params{CONFIGURE_REQUIRES} if $eumm_version < 6.52;
+ delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48;
+ delete $params{META_MERGE} if $eumm_version < 6.46;
+ delete $params{META_ADD} if $eumm_version < 6.46;
+ delete $params{LICENSE} if $eumm_version < 6.31;
+ delete $params{AUTHOR} if $] < 5.005;
+ delete $params{ABSTRACT_FROM} if $] < 5.005;
+ delete $params{BINARY_LOCATION} if $] < 5.005;
+
+ WriteMakefile(%params);
+}
+
Modified: branches/upstream/libmldbm-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmldbm-perl/current/README?rev=53261&op=diff
==============================================================================
--- branches/upstream/libmldbm-perl/current/README (original)
+++ branches/upstream/libmldbm-perl/current/README Tue Feb 23 12:59:03 2010
@@ -2,9 +2,7 @@
be used to store multidimensional hash structures in tied hashes
(including DBM files).
-This is version 2.00. It requires:
- Perl Version 5.004 or later.
- The Data::Dumper package from CPAN, version 2.08 or later.
+This is version 2.02. It requires Perl Version 5.4 or later.
If you were able to install Data::Dumper with its XSUB extension, MLDBM
will perform significantly faster.
@@ -40,6 +38,10 @@
----------------------------------------------------------------------
CHANGES
+ 2.02 (19 Feb 2010, by Alexandr Ciornii)
+ New tests added.
+ Distribution upgraded
+
2.01 (07 July 2002)
Fixed t/*.t tests to work under perl 5.8.0 RC2
The core of MLDBM was working, the tests were fixed.
Modified: branches/upstream/libmldbm-perl/current/lib/MLDBM.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmldbm-perl/current/lib/MLDBM.pm?rev=53261&op=diff
==============================================================================
--- branches/upstream/libmldbm-perl/current/lib/MLDBM.pm (original)
+++ branches/upstream/libmldbm-perl/current/lib/MLDBM.pm Tue Feb 23 12:59:03 2010
@@ -80,7 +80,7 @@
####################################################################
package MLDBM;
-$MLDBM::VERSION = $MLDBM::VERSION = '2.01';
+$MLDBM::VERSION = $MLDBM::VERSION = '2.02';
require Tie::Hash;
@MLDBM::ISA = 'Tie::Hash';
@@ -128,7 +128,7 @@
unless (ref $szr) {
$szr = "MLDBM::Serializer::$szr" # allow convenient short names
unless $szr =~ /^MLDBM::Serializer::/;
- &$loadpack($szr) or return undef;
+ $loadpack->($szr) or return undef;
$szr = $szr->new($MLDBM::DumpMeth,
$MLDBM::RemoveTaint,
$MLDBM::Key);
@@ -139,7 +139,7 @@
# Create the right TIEHASH object.
my $db = $MLDBM::UseDB;
unless (ref $db) {
- &$loadpack($db) or return undef;
+ $loadpack->($db) or return undef;
$db = $db->TIEHASH(@_)
or carp "MLDBM error: Second level tie failed, \"$!\""
and return undef;
@@ -264,14 +264,14 @@
=head1 NAME
-MLDBM - store multi-level hash structure in single level tied hash
+MLDBM - store multi-level Perl hash structure in single level tied hash
=head1 SYNOPSIS
use MLDBM; # this gets the default, SDBM
#use MLDBM qw(DB_File FreezeThaw); # use FreezeThaw for serializing
#use MLDBM qw(DB_File Storable); # use Storable for serializing
-
+
$dbm = tie %o, 'MLDBM' [..other DBM args..] or die $!;
=head1 DESCRIPTION
@@ -412,9 +412,9 @@
use MLDBM; # this gets SDBM and Data::Dumper
#use MLDBM qw(SDBM_File Storable); # SDBM and Storable
use Fcntl; # to get 'em constants
-
+
$dbm = tie %o, 'MLDBM', 'testmldbm', O_CREAT|O_RDWR, 0640 or die $!;
-
+
$c = [\ 'c'];
$b = {};
$a = [1, $b, $c];
@@ -422,20 +422,20 @@
$b->{b} = $a->[1];
$b->{c} = $a->[2];
@o{qw(a b c)} = ($a, $b, $c);
-
+
#
# to see what was stored
#
use Data::Dumper;
print Data::Dumper->Dump([@o{qw(a b c)}], [qw(a b c)]);
-
+
#
# to modify data in a substructure
#
$tmp = $o{a};
$tmp->[0] = 'foo';
$o{a} = $tmp;
-
+
#
# can access the underlying DBM methods transparently
#
@@ -444,12 +444,12 @@
Here is another small example using Storable, in a portable format:
use MLDBM qw(DB_File Storable); # DB_File and Storable
-
+
tie %o, 'MLDBM', 'testmldbm', O_CREAT|O_RDWR, 0640 or die $!;
-
+
(tied %o)->DumpMeth('portable'); # Ask for portable binary
$o{'ENV'} = \%ENV; # Stores the whole environment
-
+
=head1 BUGS
@@ -538,6 +538,8 @@
Copyright (c) 2002 Josh Chamas, Chamas Enterprises Inc.
+Copyright (c) 2010 Alexandr Ciornii.
+
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
@@ -547,6 +549,6 @@
=head1 SEE ALSO
-perl(1), perltie(1), perlfunc(1), Data::Dumper(3), FreezeThaw(3), Storable(3).
+perl(1), perltie(1), perlfunc(1), Data::Dumper(3), FreezeThaw(3), Storable(3), DBM::Deep.
=cut
Modified: branches/upstream/libmldbm-perl/current/t/storable.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmldbm-perl/current/t/storable.t?rev=53261&op=diff
==============================================================================
--- branches/upstream/libmldbm-perl/current/t/storable.t (original)
+++ branches/upstream/libmldbm-perl/current/t/storable.t Tue Feb 23 12:59:03 2010
@@ -1,16 +1,16 @@
#!/usr/bin/perl -w
+
use Fcntl;
use MLDBM qw(SDBM_File Storable);
use Data::Dumper;
use strict;
+use Test::More tests => 9;
-eval { require Storable };
-if ($@) {
- print "1..0\n";
- exit 0;
-}
+plan skip_all => "Optional module (Storable) not installed"
+ unless eval {
+ require Storable;
+ };
tie my %o, 'MLDBM', 'testmldbm', O_CREAT|O_RDWR, 0640 or die $!;
-print "1..8\n";
my $c_scalar = 'c';
my $c = [\$c_scalar];
@@ -25,12 +25,14 @@
$o{f} = 1024.1024;
my $compare_ok = &MLDBM::_compare([ @o{qw(a b c)} ], [ $a, $b, $c ]);
-if ($compare_ok) { print "ok 1\n" }
-else { print "not ok 1\n" }
+ok($compare_ok);
-print ($o{d} eq "{once upon a time}" ? "ok 2\n" : "# |$o{d}|\nnot ok 2\n");
-print ($o{e} == 1024 ? "ok 3\n" : "# |$o{e}|\nnot ok 3\n");
-print ($o{f} eq 1024.1024 ? "ok 4\n" : "# |$o{f}|\nnot ok 4\n");
+is($o{d},"{once upon a time}");
+is($o{e},1024);
+is($o{f},1024.1024);
+#print ( ? "ok 2\n" : "# |$o{d}|\nnot ok 2\n");
+#print ($o{e} == 1024 ? "ok 3\n" : "# |$o{e}|\nnot ok 3\n");
+#print ($o{f} eq 1024.1024 ? "ok 4\n" : "# |$o{f}|\nnot ok 4\n");
# NEW TEST SEQUENCE
untie %o;
@@ -49,10 +51,16 @@
$o{f} = 1024.1024;
$compare_ok = &MLDBM::_compare([ @o{qw(a b c)} ], [ $a, $b, $c]);
-if ($compare_ok) { print "ok 5\n" }
-else { print "not ok 5\n" }
+ok($compare_ok);
-print ($o{d} eq "{once upon a time}" ? "ok 6\n" : "# |$o{d}|\nnot ok 6\n");
-print ($o{e} == 1024 ? "ok 7\n" : "# |$o{e}|\nnot ok 7\n");
-print ($o{f} eq 1024.1024 ? "ok 8\n" : "# |$o{f}|\nnot ok 8\n");
+is($o{d},"{once upon a time}");
+is($o{e},1024);
+is($o{f},1024.1024);
+#print ($o{d} eq "{once upon a time}" ? "ok 6\n" : "# |$o{d}|\nnot ok 6\n");
+#print ($o{e} == 1024 ? "ok 7\n" : "# |$o{e}|\nnot ok 7\n");
+#print ($o{f} eq 1024.1024 ? "ok 8\n" : "# |$o{f}|\nnot ok 8\n");
+my $d=[17];
+$o{g}=$d;
+$d='';
+is($o{g}->[0],17);
Added: branches/upstream/libmldbm-perl/current/t/storable_dbfile.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmldbm-perl/current/t/storable_dbfile.t?rev=53261&op=file
==============================================================================
--- branches/upstream/libmldbm-perl/current/t/storable_dbfile.t (added)
+++ branches/upstream/libmldbm-perl/current/t/storable_dbfile.t Tue Feb 23 12:59:03 2010
@@ -1,0 +1,67 @@
+#!/usr/bin/perl -w
+
+use Fcntl;
+use MLDBM qw(DB_File Storable);
+use Data::Dumper;
+use strict;
+use Test::More tests => 9;
+
+plan skip_all => "Optional module (DB_File,Storable) not installed"
+ unless eval {
+ require Storable;
+ require DB_File;
+ };
+tie my %o, 'MLDBM', 'testmldbm', O_CREAT|O_RDWR, 0640 or die $!;
+
+my $c_scalar = 'c';
+my $c = [\$c_scalar];
+my $b = {};
+my $a = [1, $b, $c];
+$b->{a} = $a;
+$b->{b} = $a->[1];
+$b->{c} = $a->[2];
+ at o{qw(a b c)} = ($a, $b, $c);
+$o{d} = "{once upon a time}";
+$o{e} = 1024;
+$o{f} = 1024.1024;
+
+my $compare_ok = &MLDBM::_compare([ @o{qw(a b c)} ], [ $a, $b, $c ]);
+ok($compare_ok);
+
+is($o{d},"{once upon a time}");
+is($o{e},1024);
+is($o{f},1024.1024);
+#print ( ? "ok 2\n" : "# |$o{d}|\nnot ok 2\n");
+#print ($o{e} == 1024 ? "ok 3\n" : "# |$o{e}|\nnot ok 3\n");
+#print ($o{f} eq 1024.1024 ? "ok 4\n" : "# |$o{f}|\nnot ok 4\n");
+
+# NEW TEST SEQUENCE
+untie %o;
+my $obj = tie %o, 'MLDBM', 'testmldbm', O_CREAT|O_RDWR, 0640 or die $!;
+$obj->DumpMeth('portable');
+
+$c = [\$c_scalar];
+$b = {};
+$a = [1, $b, $c];
+$b->{a} = $a;
+$b->{b} = $a->[1];
+$b->{c} = $a->[2];
+ at o{qw(a b c)} = ($a, $b, $c);
+$o{d} = "{once upon a time}";
+$o{e} = 1024;
+$o{f} = 1024.1024;
+
+$compare_ok = &MLDBM::_compare([ @o{qw(a b c)} ], [ $a, $b, $c]);
+ok($compare_ok);
+
+is($o{d},"{once upon a time}");
+is($o{e},1024);
+is($o{f},1024.1024);
+#print ($o{d} eq "{once upon a time}" ? "ok 6\n" : "# |$o{d}|\nnot ok 6\n");
+#print ($o{e} == 1024 ? "ok 7\n" : "# |$o{e}|\nnot ok 7\n");
+#print ($o{f} eq 1024.1024 ? "ok 8\n" : "# |$o{f}|\nnot ok 8\n");
+
+my $d=[17];
+$o{g}=$d;
+$d='';
+is($o{g}->[0],17);
More information about the Pkg-perl-cvs-commits
mailing list