[Bps-public-commit] r15160 - in IPC-PubSub: . inc/Module inc/Module/Install lib/IPC lib/IPC/PubSub/Cache

audreyt at bestpractical.com audreyt at bestpractical.com
Thu Aug 14 12:49:58 EDT 2008


Author: audreyt
Date: Thu Aug 14 12:49:57 2008
New Revision: 15160

Modified:
   IPC-PubSub/Changes
   IPC-PubSub/MANIFEST
   IPC-PubSub/META.yml
   IPC-PubSub/Makefile.PL
   IPC-PubSub/inc/Module/Install.pm
   IPC-PubSub/inc/Module/Install/Base.pm
   IPC-PubSub/inc/Module/Install/Can.pm
   IPC-PubSub/inc/Module/Install/Fetch.pm
   IPC-PubSub/inc/Module/Install/Makefile.pm
   IPC-PubSub/inc/Module/Install/Metadata.pm
   IPC-PubSub/inc/Module/Install/Win32.pm
   IPC-PubSub/inc/Module/Install/WriteAll.pm
   IPC-PubSub/lib/IPC/PubSub.pm
   IPC-PubSub/lib/IPC/PubSub/Cache/DBM_Deep.pm
   IPC-PubSub/t/basic.t

Log:
* This be 0.28.

* We now require DBM::Deep 1.00 or later.

* Improved data consistency in DBM::Deep backend so it won't sometimes
  die with a "not an ARRAY reference" message.
  Reported by: Matthew Pitts


Modified: IPC-PubSub/Changes
==============================================================================
--- IPC-PubSub/Changes	(original)
+++ IPC-PubSub/Changes	Thu Aug 14 12:49:57 2008
@@ -1,3 +1,15 @@
+[Changes for 0.28 - 2008-08-15]
+
+* We now require DBM::Deep 1.00 or later.
+
+* Improved data consistency in DBM::Deep backend so it won't sometimes
+  die with a "not an ARRAY reference" message.
+  Reported by: Matthew Pitts
+
+[Changes for 0.27 - 2007-10-09]
+
+* Adjust tests so it no longer fails with newer versions of DBM::Deep.
+
 [Changes for 0.26 - 2007-05-31]
 
 * Repair a broken attempt at PAUSE uploading.

Modified: IPC-PubSub/MANIFEST
==============================================================================
--- IPC-PubSub/MANIFEST	(original)
+++ IPC-PubSub/MANIFEST	Thu Aug 14 12:49:57 2008
@@ -24,3 +24,4 @@
 META.yml
 README
 t/basic.t
+SIGNATURE                                Public-key signature (added by MakeMaker)

Modified: IPC-PubSub/META.yml
==============================================================================
--- IPC-PubSub/META.yml	(original)
+++ IPC-PubSub/META.yml	Thu Aug 14 12:49:57 2008
@@ -1,8 +1,9 @@
 --- 
 abstract: Interprocess Publish/Subscribe channels
-author: Audrey Tang <cpan at audreyt.org>
+author: 
+  - Audrey Tang <cpan at audreyt.org>
 distribution_type: module
-generated_by: Module::Install version 0.64
+generated_by: Module::Install version 0.68
 license: MIT
 meta-spec: 
   url: http://module-build.sourceforge.net/META-spec-v1.3.html
@@ -14,8 +15,9 @@
     - t
 requires: 
   Class::Accessor::Fast: 0
-  DBM::Deep: 0
+  DBM::Deep: 1.00
   Data::UUID: 0
+  Storable: 0
   Time::HiRes: 0
   perl: 5.6.0
-version: 0.26
+version: 0.28

Modified: IPC-PubSub/Makefile.PL
==============================================================================
--- IPC-PubSub/Makefile.PL	(original)
+++ IPC-PubSub/Makefile.PL	Thu Aug 14 12:49:57 2008
@@ -5,8 +5,9 @@
 license     'MIT';
 all_from    'lib/IPC/PubSub.pm';
 
+requires    'Storable';
 requires    'Time::HiRes';
-requires    'DBM::Deep';
+requires    'DBM::Deep' => '1.00';
 requires    'Data::UUID';
 requires    'Class::Accessor::Fast';
 

Modified: IPC-PubSub/inc/Module/Install.pm
==============================================================================
--- IPC-PubSub/inc/Module/Install.pm	(original)
+++ IPC-PubSub/inc/Module/Install.pm	Thu Aug 14 12:49:57 2008
@@ -28,7 +28,7 @@
     # This is not enforced yet, but will be some time in the next few
     # releases once we can make sure it won't clash with custom
     # Module::Install extensions.
-    $VERSION = '0.64';
+    $VERSION = '0.68';
 }
 
 # Whether or not inc::Module::Install is actually loaded, the

Modified: IPC-PubSub/inc/Module/Install/Base.pm
==============================================================================
--- IPC-PubSub/inc/Module/Install/Base.pm	(original)
+++ IPC-PubSub/inc/Module/Install/Base.pm	Thu Aug 14 12:49:57 2008
@@ -1,7 +1,7 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.64';
+$VERSION = '0.68';
 
 # Suspend handler for "redefined" warnings
 BEGIN {

Modified: IPC-PubSub/inc/Module/Install/Can.pm
==============================================================================
--- IPC-PubSub/inc/Module/Install/Can.pm	(original)
+++ IPC-PubSub/inc/Module/Install/Can.pm	Thu Aug 14 12:49:57 2008
@@ -11,7 +11,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.64';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: IPC-PubSub/inc/Module/Install/Fetch.pm
==============================================================================
--- IPC-PubSub/inc/Module/Install/Fetch.pm	(original)
+++ IPC-PubSub/inc/Module/Install/Fetch.pm	Thu Aug 14 12:49:57 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.64';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: IPC-PubSub/inc/Module/Install/Makefile.pm
==============================================================================
--- IPC-PubSub/inc/Module/Install/Makefile.pm	(original)
+++ IPC-PubSub/inc/Module/Install/Makefile.pm	Thu Aug 14 12:49:57 2008
@@ -7,7 +7,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.64';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -17,196 +17,221 @@
 my %seen = ();
 
 sub prompt {
-    shift;
+	shift;
 
-    # Infinite loop protection
-    my @c = caller();
-    if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
-        die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
-    }
-
-    # In automated testing, always use defaults
-    if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
-        local $ENV{PERL_MM_USE_DEFAULT} = 1;
-        goto &ExtUtils::MakeMaker::prompt;
-    } else {
-        goto &ExtUtils::MakeMaker::prompt;
-    }
+	# Infinite loop protection
+	my @c = caller();
+	if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
+		die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
+	}
+
+	# In automated testing, always use defaults
+	if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
+		local $ENV{PERL_MM_USE_DEFAULT} = 1;
+		goto &ExtUtils::MakeMaker::prompt;
+	} else {
+		goto &ExtUtils::MakeMaker::prompt;
+	}
 }
 
 sub makemaker_args {
-    my $self = shift;
-    my $args = ($self->{makemaker_args} ||= {});
-    %$args = ( %$args, @_ ) if @_;
-    $args;
+	my $self = shift;
+	my $args = ($self->{makemaker_args} ||= {});
+	%$args = ( %$args, @_ ) if @_;
+	$args;
 }
 
 # For mm args that take multiple space-seperated args,
 # append an argument to the current list.
 sub makemaker_append {
-    my $self = shift;
-    my $name = shift;
-    my $args = $self->makemaker_args;
-    $args->{name} = defined $args->{$name}
-    	? join( ' ', $args->{name}, @_ )
-    	: join( ' ', @_ );
+	my $self = sShift;
+	my $name = shift;
+	my $args = $self->makemaker_args;
+	$args->{name} = defined $args->{$name}
+		? join( ' ', $args->{name}, @_ )
+		: join( ' ', @_ );
 }
 
 sub build_subdirs {
-    my $self    = shift;
-    my $subdirs = $self->makemaker_args->{DIR} ||= [];
-    for my $subdir (@_) {
-        push @$subdirs, $subdir;
-    }
+	my $self    = shift;
+	my $subdirs = $self->makemaker_args->{DIR} ||= [];
+	for my $subdir (@_) {
+		push @$subdirs, $subdir;
+	}
 }
 
 sub clean_files {
-    my $self  = shift;
-    my $clean = $self->makemaker_args->{clean} ||= {};
-    %$clean = (
-        %$clean, 
-        FILES => join(' ', grep length, $clean->{FILES}, @_),
-    );
+	my $self  = shift;
+	my $clean = $self->makemaker_args->{clean} ||= {};
+	%$clean = (
+		%$clean, 
+		FILES => join(' ', grep length, $clean->{FILES}, @_),
+	);
 }
 
 sub realclean_files {
-    my $self  = shift;
-    my $realclean = $self->makemaker_args->{realclean} ||= {};
-    %$realclean = (
-        %$realclean, 
-        FILES => join(' ', grep length, $realclean->{FILES}, @_),
-    );
+	my $self  = shift;
+	my $realclean = $self->makemaker_args->{realclean} ||= {};
+	%$realclean = (
+		%$realclean, 
+		FILES => join(' ', grep length, $realclean->{FILES}, @_),
+	);
 }
 
 sub libs {
-    my $self = shift;
-    my $libs = ref $_[0] ? shift : [ shift ];
-    $self->makemaker_args( LIBS => $libs );
+	my $self = shift;
+	my $libs = ref $_[0] ? shift : [ shift ];
+	$self->makemaker_args( LIBS => $libs );
 }
 
 sub inc {
-    my $self = shift;
-    $self->makemaker_args( INC => shift );
+	my $self = shift;
+	$self->makemaker_args( INC => shift );
+}
+
+my %test_dir = ();
+
+sub _wanted_t {
+	/\.t$/ and -f $_ and $test_dir{$File::Find::dir} = 1;
+}
+
+sub tests_recursive {
+	my $self = shift;
+	if ( $self->tests ) {
+		die "tests_recursive will not work if tests are already defined";
+	}
+	my $dir = shift || 't';
+	unless ( -d $dir ) {
+		die "tests_recursive dir '$dir' does not exist";
+	}
+	require File::Find;
+	%test_dir = ();
+	File::Find::find( \&_wanted_t, $dir );
+	$self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
 }
 
 sub write {
-    my $self = shift;
-    die "&Makefile->write() takes no arguments\n" if @_;
+	my $self = shift;
+	die "&Makefile->write() takes no arguments\n" if @_;
 
-    my $args = $self->makemaker_args;
-    $args->{DISTNAME} = $self->name;
-    $args->{NAME}     = $self->module_name || $self->name || $self->determine_NAME($args);
-    $args->{VERSION}  = $self->version || $self->determine_VERSION($args);
-    $args->{NAME}     =~ s/-/::/g;
-    if ( $self->tests ) {
-        $args->{test} = { TESTS => $self->tests };
-    }
-    if ($] >= 5.005) {
-        $args->{ABSTRACT} = $self->abstract;
-        $args->{AUTHOR}   = $self->author;
-    }
-    if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
-        $args->{NO_META} = 1;
-    }
-    if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
-        $args->{SIGN} = 1;
-    }
-    unless ( $self->is_admin ) {
-        delete $args->{SIGN};
-    }
-
-    # merge both kinds of requires into prereq_pm
-    my $prereq = ($args->{PREREQ_PM} ||= {});
-    %$prereq = ( %$prereq, map { @$_ } map { @$_ } grep $_,
-                 ($self->build_requires, $self->requires) );
-
-    # merge both kinds of requires into prereq_pm
-    my $subdirs = ($args->{DIR} ||= []);
-    if ($self->bundles) {
-        foreach my $bundle (@{ $self->bundles }) {
-            my ($file, $dir) = @$bundle;
-            push @$subdirs, $dir if -d $dir;
-            delete $prereq->{$file};
-        }
-    }
-
-    if ( my $perl_version = $self->perl_version ) {
-        eval "use $perl_version; 1"
-            or die "ERROR: perl: Version $] is installed, "
-                . "but we need version >= $perl_version";
-    }
-
-    $args->{INSTALLDIRS} = $self->installdirs;
-
-    my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
-
-    my $user_preop = delete $args{dist}->{PREOP};
-    if (my $preop = $self->admin->preop($user_preop)) {
-        $args{dist} = $preop;
-    }
+	my $args = $self->makemaker_args;
+	$args->{DISTNAME} = $self->name;
+	$args->{NAME}     = $self->module_name || $self->name || $self->determine_NAME($args);
+	$args->{VERSION}  = $self->version || $self->determine_VERSION($args);
+	$args->{NAME}     =~ s/-/::/g;
+	if ( $self->tests ) {
+		$args->{test} = { TESTS => $self->tests };
+	}
+	if ($] >= 5.005) {
+		$args->{ABSTRACT} = $self->abstract;
+		$args->{AUTHOR}   = $self->author;
+	}
+	if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
+		$args->{NO_META} = 1;
+	}
+	if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
+		$args->{SIGN} = 1;
+	}
+	unless ( $self->is_admin ) {
+		delete $args->{SIGN};
+	}
+
+	# merge both kinds of requires into prereq_pm
+	my $prereq = ($args->{PREREQ_PM} ||= {});
+	%$prereq = ( %$prereq,
+		map { @$_ }
+		map { @$_ }
+		grep $_,
+		($self->build_requires, $self->requires)
+	);
+
+	# merge both kinds of requires into prereq_pm
+	my $subdirs = ($args->{DIR} ||= []);
+	if ($self->bundles) {
+		foreach my $bundle (@{ $self->bundles }) {
+			my ($file, $dir) = @$bundle;
+			push @$subdirs, $dir if -d $dir;
+			delete $prereq->{$file};
+		}
+	}
+
+	if ( my $perl_version = $self->perl_version ) {
+		eval "use $perl_version; 1"
+			or die "ERROR: perl: Version $] is installed, "
+			. "but we need version >= $perl_version";
+	}
+
+	$args->{INSTALLDIRS} = $self->installdirs;
+
+	my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
+
+	my $user_preop = delete $args{dist}->{PREOP};
+	if (my $preop = $self->admin->preop($user_preop)) {
+		$args{dist} = $preop;
+	}
 
-    my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
-    $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
+	my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
+	$self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
 }
 
 sub fix_up_makefile {
-    my $self          = shift;
-    my $makefile_name = shift;
-    my $top_class     = ref($self->_top) || '';
-    my $top_version   = $self->_top->VERSION || '';
-
-    my $preamble = $self->preamble 
-        ? "# Preamble by $top_class $top_version\n"
-            . $self->preamble
-        : '';
-    my $postamble = "# Postamble by $top_class $top_version\n"
-        . ($self->postamble || '');
-
-    local *MAKEFILE;
-    open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
-    my $makefile = do { local $/; <MAKEFILE> };
-    close MAKEFILE or die $!;
-
-    $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
-    $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
-    $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
-    $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
-    $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
-
-    # Module::Install will never be used to build the Core Perl
-    # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
-    # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
-    $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
-    #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
-
-    # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
-    $makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
-
-    # XXX - This is currently unused; not sure if it breaks other MM-users
-    # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
-
-    open  MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
-    print MAKEFILE  "$preamble$makefile$postamble" or die $!;
-    close MAKEFILE  or die $!;
+	my $self          = shift;
+	my $makefile_name = shift;
+	my $top_class     = ref($self->_top) || '';
+	my $top_version   = $self->_top->VERSION || '';
+
+	my $preamble = $self->preamble 
+		? "# Preamble by $top_class $top_version\n"
+			. $self->preamble
+		: '';
+	my $postamble = "# Postamble by $top_class $top_version\n"
+		. ($self->postamble || '');
+
+	local *MAKEFILE;
+	open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+	my $makefile = do { local $/; <MAKEFILE> };
+	close MAKEFILE or die $!;
+
+	$makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
+	$makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
+	$makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
+	$makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
+	$makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
+
+	# Module::Install will never be used to build the Core Perl
+	# Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
+	# PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
+	$makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
+	#$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
+
+	# Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
+	$makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
+
+	# XXX - This is currently unused; not sure if it breaks other MM-users
+	# $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
+
+	open  MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
+	print MAKEFILE  "$preamble$makefile$postamble" or die $!;
+	close MAKEFILE  or die $!;
 
-    1;
+	1;
 }
 
 sub preamble {
-    my ($self, $text) = @_;
-    $self->{preamble} = $text . $self->{preamble} if defined $text;
-    $self->{preamble};
+	my ($self, $text) = @_;
+	$self->{preamble} = $text . $self->{preamble} if defined $text;
+	$self->{preamble};
 }
 
 sub postamble {
-    my ($self, $text) = @_;
-    $self->{postamble} ||= $self->admin->postamble;
-    $self->{postamble} .= $text if defined $text;
-    $self->{postamble}
+	my ($self, $text) = @_;
+	$self->{postamble} ||= $self->admin->postamble;
+	$self->{postamble} .= $text if defined $text;
+	$self->{postamble}
 }
 
 1;
 
 __END__
 
-#line 338
+#line 363

Modified: IPC-PubSub/inc/Module/Install/Metadata.pm
==============================================================================
--- IPC-PubSub/inc/Module/Install/Metadata.pm	(original)
+++ IPC-PubSub/inc/Module/Install/Metadata.pm	Thu Aug 14 12:49:57 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.64';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }
@@ -56,13 +56,23 @@
     };
 }
 
-sub install_dirs_site { my $self = shift; $self->installdirs('site') };
-sub install_dirs_perl { my $self = shift; $self->installdirs('perl') };
-sub install_dirs_vendor { my $self = shift; $self->installdirs('vendor') };
+# configure_requires is currently a null-op
+sub configure_requires { 1 }
+
+# Aliases for build_requires that will have alternative
+# meanings in some future version of META.yml.
+sub test_requires      { shift->build_requires(@_)  }
+sub install_requires   { shift->build_requires(@_)  }
+
+# Aliases for installdirs options
+sub install_as_core    { $_[0]->installdirs('perl')   }
+sub install_as_cpan    { $_[0]->installdirs('site')   }
+sub install_as_site    { $_[0]->installdirs('site')   }
+sub install_as_vendor  { $_[0]->installdirs('vendor') }
 
 sub sign {
     my $self = shift;
-    return $self->{'values'}{'sign'} if defined wantarray and !@_;
+    return $self->{'values'}{'sign'} if defined wantarray and ! @_;
     $self->{'values'}{'sign'} = ( @_ ? $_[0] : 1 );
     return $self;
 }
@@ -295,20 +305,24 @@
     {
         my $license_text = $1;
         my @phrases      = (
-            'under the same (?:terms|license) as perl itself' => 'perl',
-            'GNU public license'                              => 'gpl',
-            'GNU lesser public license'                       => 'gpl',
-            'BSD license'                                     => 'bsd',
-            'Artistic license'                                => 'artistic',
-            'GPL'                                             => 'gpl',
-            'LGPL'                                            => 'lgpl',
-            'BSD'                                             => 'bsd',
-            'Artistic'                                        => 'artistic',
-            'MIT'                                             => 'MIT',
+            'under the same (?:terms|license) as perl itself' => 'perl',        1,
+            'GNU public license'                              => 'gpl',         1,
+            'GNU lesser public license'                       => 'gpl',         1,
+            'BSD license'                                     => 'bsd',         1,
+            'Artistic license'                                => 'artistic',    1,
+            'GPL'                                             => 'gpl',         1,
+            'LGPL'                                            => 'lgpl',        1,
+            'BSD'                                             => 'bsd',         1,
+            'Artistic'                                        => 'artistic',    1,
+            'MIT'                                             => 'mit',         1,
+            'proprietary'                                     => 'proprietary', 0,
         );
-        while ( my ( $pattern, $license ) = splice( @phrases, 0, 2 ) ) {
+        while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
             $pattern =~ s{\s+}{\\s+}g;
             if ( $license_text =~ /\b$pattern\b/i ) {
+                if ( $osi and $license_text =~ /All rights reserved/i ) {
+                        warn "LEGAL WARNING: 'All rights reserved' may invalidate Open Source licenses. Consider removing it.";
+		}
                 $self->license($license);
                 return 1;
             }

Modified: IPC-PubSub/inc/Module/Install/Win32.pm
==============================================================================
--- IPC-PubSub/inc/Module/Install/Win32.pm	(original)
+++ IPC-PubSub/inc/Module/Install/Win32.pm	Thu Aug 14 12:49:57 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.64';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: IPC-PubSub/inc/Module/Install/WriteAll.pm
==============================================================================
--- IPC-PubSub/inc/Module/Install/WriteAll.pm	(original)
+++ IPC-PubSub/inc/Module/Install/WriteAll.pm	Thu Aug 14 12:49:57 2008
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION $ISCORE @ISA};
 BEGIN {
-	$VERSION = '0.64';
+	$VERSION = '0.68';
 	$ISCORE  = 1;
 	@ISA     = qw{Module::Install::Base};
 }

Modified: IPC-PubSub/lib/IPC/PubSub.pm
==============================================================================
--- IPC-PubSub/lib/IPC/PubSub.pm	(original)
+++ IPC-PubSub/lib/IPC/PubSub.pm	Thu Aug 14 12:49:57 2008
@@ -1,5 +1,5 @@
 package IPC::PubSub;
-$IPC::PubSub::VERSION = '0.26';
+$IPC::PubSub::VERSION = '0.28';
 
 use 5.006;
 use strict;

Modified: IPC-PubSub/lib/IPC/PubSub/Cache/DBM_Deep.pm
==============================================================================
--- IPC-PubSub/lib/IPC/PubSub/Cache/DBM_Deep.pm	(original)
+++ IPC-PubSub/lib/IPC/PubSub/Cache/DBM_Deep.pm	Thu Aug 14 12:49:57 2008
@@ -2,13 +2,18 @@
 use strict;
 use warnings;
 use base 'IPC::PubSub::Cache';
+use Storable qw/ nfreeze thaw /;
 use DBM::Deep;
 use File::Temp qw/ tempfile /;
 
 sub new {
     my $class = shift;
     my $file  = shift;
-    my $mem = DBM::Deep->new($file || $class->default_config);
+    my $mem = DBM::Deep->new(
+        file        => ((defined $file and length $file) ? $file : $class->default_config),
+        locking     => 1,
+        autoflush   => 1,
+    );
     bless(\$mem, $class);
 }
 
@@ -19,12 +24,12 @@
 
 sub fetch {
     my $self = shift;
-    map { $$self->get($_) } @_;
+    return map { thaw($$self->get($_)) } @_;
 }
 
 sub store {
     my ($self, $key, $val, $time, $expiry) = @_;
-    $$self->put($key, [$time, $val]);
+    $$self->put($key => nfreeze([$time, $val]));
 }
 
 sub publisher_indices {

Modified: IPC-PubSub/t/basic.t
==============================================================================
--- IPC-PubSub/t/basic.t	(original)
+++ IPC-PubSub/t/basic.t	Thu Aug 14 12:49:57 2008
@@ -12,7 +12,7 @@
 unshift @backends, 'JiftyDBI' if eval { require Jifty::DBI };
 unshift @backends, 'Memcached' if eval { require Cache::Memcached } and IO::Socket::INET->new('127.0.0.1:11211');
 
-plan tests => 12 * scalar @backends;
+plan tests => 15 * scalar @backends;
 
 my $tmp = tmpnam();
 END { unlink $tmp }
@@ -42,11 +42,15 @@
     $pub->msg(['bar', 'bar']);
     $pub->msg('baz');
 
-    is_deeply([$sub[0]->get], ['foo', ['bar', 'bar'], 'baz'], 'get worked');
+    my $got = $sub[0]->get;
+    is($got->[0], 'foo', 'get worked');
+    is($got->[1][0], 'bar', 'get worked');
+    is($got->[1][1], 'bar', 'get worked');
+    is($got->[2], 'baz', 'get worked');
     is_deeply([$sub[0]->get], [], 'get emptied the cache');
 
-    is_deeply([map {$_->[1]} @{$sub[1]->get_all->{''}}], [['bar', 'bar'], 'baz'], 'get_all worked');
-    is_deeply([map {$_->[1]} @{$sub[1]->get_all->{''}}], [], 'get_all emptied the cache');
+    is_deeply([map {ref($_) ? [@$_] : $_} map {$_->[1]} @{$sub[1]->get_all->{''}}], [['bar', 'bar'], 'baz'], 'get_all worked');
+    is_deeply([map {ref($_) ? [@$_] : $_} map {$_->[1]} @{$sub[1]->get_all->{''}}], [], 'get_all emptied the cache');
 
     is($bus->modify('key'), undef, 'modify (1)');
     is($bus->modify('key' => 'val'), 'val', 'modify (2)');



More information about the Bps-public-commit mailing list