# #
# File: shared/Lock/API.pm #
# #
-# Authors: Andre Malo <nd@o3media.de>, 2001-05-25 #
+# Authors: André Malo <nd@o3media.de> #
# #
# Description: system independent part of Locking and Filehandle class #
# NOT FOR PUBLIC USE #
################################################################################
use strict;
-use vars qw(
- $VERSION
-);
-
use Carp;
use base qw(
#
# Version check
#
-$VERSION = do { my @r =(q$Revision$ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+# last modified:
+# $Date$ (GMT)
+# by $Author$
+#
+sub VERSION {(q$Revision$ =~ /([\d.]+)\s*$/)[0] or '0.0'}
### sub lock ###################################################################
#
$self -> lock ($self->LH_EXCL, $self -> timeout('master')) and
$self -> _simple_lock (new Lock::Handle ($self->masterlock)) and
return 1;
+
+ # oops..?
+ # VERY violent way to set master lock
+ #
+ $self -> release;
+
+ $self -> lock ($self->LH_EXCL, $self -> timeout('master')) and
+ $self -> _simple_lock (new Lock::Handle ($self->masterlock)) and
+ return 1;
}
###########################################