From: rkinyon Date: Sun, 9 Mar 2008 23:56:39 +0000 (+0000) Subject: Workaround hack for Win32 and autovivification X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=599d77bced8770040a1642cd3ffd5307dc969d00;p=dbsrgits%2FDBM-Deep.git Workaround hack for Win32 and autovivification --- diff --git a/lib/DBM/Deep/File.pm b/lib/DBM/Deep/File.pm index c81b3f5..a37b4a3 100644 --- a/lib/DBM/Deep/File.pm +++ b/lib/DBM/Deep/File.pm @@ -163,6 +163,12 @@ sub lock { $type = LOCK_EX unless defined $type; + #XXX This is a temporary fix for Win32 and autovivification. It + # needs to improve somehow. -RobK, 2008-03-09 + if ( $^O eq 'MSWin32' || $^O eq 'cygwin' ) { + $type = LOCK_EX; + } + if (!defined($self->{fh})) { return; } #XXX This either needs to allow for upgrading a shared lock to an