'Fcntl' => '0.01',
'Scalar::Util' => '1.14',
'Digest::MD5' => '1.00',
- 'FileHandle::Fmode' => '0.05',
},
build_requires => {
'File::Path' => '0.01',
Revision history for DBM::Deep.
+1.0012 Jun 09 15:00:00 2008 EST
+ - (This version is compatible with 1.0011)
+ - Fix for RT#30085 (Remove dependency on XS module)
+ - Thank you very much tachyon-II@Perlmonks!!
+ - Updated the POD with fixes that were made, but still on the TODO list.
+ - Bypass for RT#36419 (t/44_upgrade_db.t fails on *BSD)
+ - We're just going to skip that for now. It's a number-of-processes-open
+ issue. Best is to do a port to another module to do the heavy lifting.
+
+1.0011 May 27 15:00:00 2008 EST
+ - (This version is compatible with 1.0010)
+ - A test has the wrong plan.
+
1.0010 May 27 12:00:00 2008 EST
- (This version is compatible with 1.0009)
- Fix for RT#35140 (invalid POD links)
use strict;
use warnings;
-our $VERSION = q(1.0010);
+our $VERSION = q(1.0012);
use Data::Dumper ();
use Fcntl qw( :flock );
=head2 Caching
-If a user is willing to assert upon opening the file that this process will be
+If a client is willing to assert upon opening the file that this process will be
the only consumer of that datafile, then there are a number of caching
possibilities that can be taken advantage of. This does, however, mean that
DBM::Deep is more vulnerable to losing data due to unflushed changes. It also
single-process. I have no idea how I'd specify this, though. Suggestions are
welcome.
-=head2 Importing using Data::Walker
-
-Right now, importing is done using C<Clone::clone()> to make a complete copy
-in memory, then tying that copy. It would be much better to use
-L<Data::Walker> to walk the data structure instead, particularly in the case
-of large datastructures.
-
=head2 Different contention resolution mechanisms
Currently, the only contention resolution mechanism is last-write-wins. This
on DBM::Deep, as every element has to be fetched from disk, then stored again in
a different location. This will be addressed in a future version.
+This has been somewhat addressed so that the cost is constant, regardless of
+what is stored at those locations. So, small arrays with huge data structures in
+them are faster. But, large arrays are still large.
+
=head2 Writeonly Files
-If you pass in a filehandle to new(), you may have opened it in either a readonly or
-writeonly mode. STORE will verify that the filehandle is writable. However, there
-doesn't seem to be a good way to determine if a filehandle is readable. And, if the
-filehandle isn't readable, it's not clear what will happen. So, don't do that.
+If you pass in a filehandle to new(), you may have opened it in either a
+readonly or writeonly mode. STORE will verify that the filehandle is writable.
+However, there doesn't seem to be a good way to determine if a filehandle is
+readable. And, if the filehandle isn't readable, it's not clear what will
+happen. So, don't do that.
=head2 Assignments Within Transactions
use strict;
use warnings;
-our $VERSION = q(1.0010);
+our $VERSION = q(1.0012);
# This is to allow DBM::Deep::Array to handle negative indices on
# its own. Otherwise, Perl would intercept the call to negative
use strict;
use warnings;
-our $VERSION = q(1.0010);
+our $VERSION = q(1.0012);
# Never import symbols into our namespace. We are a class, not a library.
# -RobK, 2008-05-27
use strict;
use warnings;
-our $VERSION = q(1.0010);
+our $VERSION = q(1.0012);
use Fcntl qw( :DEFAULT :flock :seek );
-use FileHandle::Fmode ();
sub new {
my $class = shift;
return 1;
}
+# Taken from http://www.perlmonks.org/?node_id=691054
sub is_writable {
my $self = shift;
- return FileHandle::Fmode::is_W( $self->{fh} );
+
+ my $fh = $self->{fh};
+ return unless defined $fh;
+ return unless defined fileno $fh;
+ local $\ = ''; # just in case
+ no warnings; # temporarily disable warnings
+ local $^W; # temporarily disable warnings
+ return print $fh '';
}
sub copy_stats {
use strict;
use warnings;
-our $VERSION = q(1.0010);
+our $VERSION = q(1.0012);
use base 'DBM::Deep';
plan skip_all => "Skipping the upgrade_db.pl tests on Win32/cygwin for now."
if ( $^O eq 'MSWin32' || $^O eq 'cygwin' );
+ plan skip_all => "Skipping the upgrade_db.pl tests on *bsd for now."
+ if ( $^O =~ /bsd/i );
+
+
my @failures;
eval { use Pod::Usage 1.3; }; push @failures, 'Pod::Usage' if $@;
eval { use IO::Scalar; }; push @failures, 'IO::Scalar' if $@;
}
}
-plan tests => 252;
+plan tests => 282;
use t::common qw( new_fh );
use File::Spec;
'0.981', '0.982', '0.983',
'0.99_01', '0.99_02', '0.99_03', '0.99_04',
'1.00', '1.000', '1.0000', '1.0001', '1.0002',
- '1.0003', '1.0004', '1.0005', '1.0006', '1.0007', '1.0008', '1.0009',
+ '1.0003', '1.0004', '1.0005', '1.0006', '1.0007', '1.0008', '1.0009', '1.0010', '1.0011', '1.0012',
);
foreach my $input_filename (
die "$output\n" if $output;
my $db;
- if ( $v =~ /^1\.000[3-9]/ ) {
+ if ( $v =~ /^1\.001[0-2]/ || $v =~ /^1\.000[3-9]/ ) {
push @INC, 'lib';
eval "use DBM::Deep";
$db = DBM::Deep->new( $output_filename );
my %opts = (
man => 0,
help => 0,
- version => '1.0010',
+ version => '1.0012',
autobless => 1,
);
GetOptions( \%opts,
{
my $ver = $opts{version};
- if ( $ver =~ /^1\.0010/) {
+ if ( $ver =~ /^1\.001[0-2]/) {
$ver = 3;
}
elsif ( $ver =~ /^1\.000[3-9]/) {