# #
# File: shared/CheckRFC.pm #
# #
-# Authors: Andre Malo <nd@o3media.de>, 2001-06-16 #
+# Authors: André Malo <nd@o3media.de> #
# #
# Description: read and parse admin default config #
# #
use strict;
use vars qw(
@EXPORT
- $VERSION
);
-use Lock qw(:READ);
+use Lock;
use XML::DOM;
#
# 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'}
################################################################################
#
my %conf;
if (-f $filename) {
- if (lock_file ($filename)) {
- my $xml = new XML::DOM::Parser -> parsefile ($filename);
- violent_unlock_file ($filename) unless (unlock_file ($filename));
+ my $admin = new Lock ($filename);
+ if ($admin -> lock(LH_SHARED)) {
+ my $xml = new XML::DOM::Parser -> parsefile ($admin -> filename);
+ $admin -> unlock;
# write data into the hash
#
-> getFirstChild -> getData
};
}
-
- else {
- violent_unlock_file ($filename);
- }
}
# return
#
#
-### end of Conf::Admin #########################################################
+### end of Conf::Admin #########################################################
\ No newline at end of file