From: rkinyon Date: Fri, 17 Feb 2006 16:09:55 +0000 (+0000) Subject: Removed call to FileHandle->flush() X-Git-Tag: 0-97~52 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c112e68e0f695a1081fd1dceb0e66a6facd3e525;p=dbsrgits%2FDBM-Deep.git Removed call to FileHandle->flush() --- diff --git a/lib/DBM/Deep.pm b/lib/DBM/Deep.pm index 20cf2eb..84be3bc 100644 --- a/lib/DBM/Deep.pm +++ b/lib/DBM/Deep.pm @@ -253,12 +253,15 @@ sub _open { } my $fh = $self->fh; + + #XXX Can we remove this by using the right sysopen() flags? binmode $fh; # for win32 + if ($self->root->{autoflush}) { +# $self->fh->autoflush(); my $old = select( $fh ); $|++; select $old; -# $self->fh->autoflush(); } my $signature; @@ -277,7 +280,12 @@ sub _open { my $plain_key = "[base]"; $fh->print( pack($DATA_LENGTH_PACK, length($plain_key)) . $plain_key ); $self->root->{end} += $DATA_LENGTH_SIZE + length($plain_key); - $fh->flush(); + +# $fh->flush(); + my $old_fh = select $fh; + local $| = 1; + print $fh q{}; + select $old_fh; return 1; }