From: rkinyon Date: Wed, 22 Mar 2006 14:34:07 +0000 (+0000) Subject: Fixed failing test due to changed header X-Git-Tag: 0-99_01~42 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=96041a257f0523eaa1e0d0a1e6e4c98120618464;p=dbsrgits%2FDBM-Deep.git Fixed failing test due to changed header --- diff --git a/lib/DBM/Deep.pm b/lib/DBM/Deep.pm index 5bb3beb..43f5be2 100644 --- a/lib/DBM/Deep.pm +++ b/lib/DBM/Deep.pm @@ -96,10 +96,9 @@ sub new { return bless $self, $class; } +# This initializer is called from the various TIE* methods. new() calls tie(), +# which allows for a single point of entry. sub _init { - ## - # Setup $self and bless into this class. - ## my $class = shift; my ($args) = @_; @@ -110,6 +109,8 @@ sub _init { base_offset => undef, }, $class; + # Strip out the node-level parameters before passing $args to + # the root's constructor. foreach my $param ( keys %$self ) { next unless exists $args->{$param}; $self->{$param} = delete $args->{$param} @@ -122,6 +123,8 @@ sub _init { ? $args->{root} : DBM::Deep::_::Root->new( $args ); + #XXX Right before this line, we have to set the physical parameters like + #XXX 2S vs. 4N vs. 8Q or max_buckets, etc. $self->{engine}->setup_fh( $self ); return $self; diff --git a/t/27_filehandle.t b/t/27_filehandle.t index 6ec27d1..744a8fd 100644 --- a/t/27_filehandle.t +++ b/t/27_filehandle.t @@ -50,7 +50,7 @@ my $offset = tell(FILE); close(FILE); SKIP: { - skip "File format changed ... gah!", 5; + skip "File header and format changed ... gah!", 5; open(FILE, "t/28_DATA.t"); my $db; diff --git a/t/28_DATA.t b/t/28_DATA.t index 5c655b3..a3cff0f 100644 Binary files a/t/28_DATA.t and b/t/28_DATA.t differ