X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/4efca15bb2136c3e226eb4e372776fad95a955c9..f91793544f0d5c7f978e5cf6214d9882d7c4db7c:/selfforum-cgi/shared/Lock/API.pm?ds=inline diff --git a/selfforum-cgi/shared/Lock/API.pm b/selfforum-cgi/shared/Lock/API.pm index 21f3ecf..8210ef7 100644 --- a/selfforum-cgi/shared/Lock/API.pm +++ b/selfforum-cgi/shared/Lock/API.pm @@ -4,7 +4,7 @@ package Lock::API; # # # File: shared/Lock/API.pm # # # -# Authors: Andre Malo , 2001-05-25 # +# Authors: André Malo # # # # Description: system independent part of Locking and Filehandle class # # NOT FOR PUBLIC USE # @@ -12,10 +12,6 @@ package Lock::API; ################################################################################ use strict; -use vars qw( - $VERSION -); - use Carp; use base qw( @@ -27,7 +23,11 @@ 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 ################################################################### # @@ -142,6 +142,15 @@ 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; } ###########################################