X-Git-Url: https://git.p6c8.net/selfforum.git/blobdiff_plain/4efca15bb2136c3e226eb4e372776fad95a955c9..69cc2ea1cf06c310ec4079e301e360f78802c34b:/selfforum-cgi/shared/Lock/Handle.pm?ds=sidebyside diff --git a/selfforum-cgi/shared/Lock/Handle.pm b/selfforum-cgi/shared/Lock/Handle.pm index e5a749e..e89f4b2 100644 --- a/selfforum-cgi/shared/Lock/Handle.pm +++ b/selfforum-cgi/shared/Lock/Handle.pm @@ -4,7 +4,7 @@ package Lock::Handle; # # # File: shared/Lock/Handle.pm # # # -# Authors: Andre Malo , 2001-05-30 # +# Authors: André Malo # # # # Description: belongs to Locking and Filehandle class # # NOT FOR PUBLIC USE # @@ -12,19 +12,19 @@ package Lock::Handle; ################################################################################ use strict; -use vars qw( - $VERSION -); +use Symbol qw(gensym); use base qw(Lock::_static); -use Symbol qw(gensym); - ################################################################################ # # 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 new #################################################################### # @@ -44,6 +44,36 @@ sub new { $self; } +### open () #################################################################### +# +# open a file +# +# Params: $mode - open mode +# +# Return: success code (boolean) +# +sub open { + my ($self, $mode) = @_; + + return unless defined ($mode); + + sysopen ($self, $self->filename, $mode); +} + +### close () ################################################################### +# +# close a file +# +# Params: ~none~ +# +# Return: success code (boolean) +# +sub close { + my $self = shift; + + CORE::close $self; +} + ### sub _create_handle ######################################################### # # create a globref