From: ndparker <> Date: Thu, 26 Jul 2001 00:08:23 +0000 (+0000) Subject: modified version check X-Git-Url: https://git.p6c8.net/selfforum.git/commitdiff_plain/472dba29bb006016c24d9b7ce72b697da4fb1f57?ds=sidebyside modified version check --- diff --git a/selfforum-cgi/shared/CheckRFC.pm b/selfforum-cgi/shared/CheckRFC.pm index b000dcf..b43d723 100644 --- a/selfforum-cgi/shared/CheckRFC.pm +++ b/selfforum-cgi/shared/CheckRFC.pm @@ -4,7 +4,7 @@ package CheckRFC; # # # File: shared/CheckRFC.pm # # # -# Authors: Andre Malo , 2001-04-14 # +# Authors: André Malo # # # # Description: implement several string checks on RFC correctness # # # @@ -17,7 +17,6 @@ use vars qw( @email @EXPORT @ISA - $VERSION ); $v56 = eval q[ @@ -27,9 +26,15 @@ $v56 = eval q[ use Carp qw(croak); +################################################################################ +# # 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'} ################################################################################ # @@ -309,7 +314,7 @@ BEGIN { } } -# keeping require happy +# keep 'require' happy 1; # diff --git a/selfforum-cgi/shared/Conf.pm b/selfforum-cgi/shared/Conf.pm index c0920d0..eead4dc 100644 --- a/selfforum-cgi/shared/Conf.pm +++ b/selfforum-cgi/shared/Conf.pm @@ -4,7 +4,7 @@ package Conf; # # # File: shared/Conf.pm # # # -# Authors: Andre Malo , 2001-06-16 # +# Authors: André Malo # # # # Description: read and parse configuration files # # # @@ -13,15 +13,19 @@ package Conf; use strict; use vars qw( @EXPORT - $VERSION ); 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'} ################################################################################ # @@ -164,8 +168,6 @@ sub parse_script_conf ($\%$) { # $Shared - /path/to/shared-dir # -- " -- # $Script - scriptname # -# Return: hashref of config hash -# sub read_script_conf ($$$) { my ($Config, $Shared, $Script) = @_; @@ -209,4 +211,4 @@ ref($_)eq 'HASH'){&hash($_,"$string\[$i] -> ")}else{if(ref($_)eq'ARRAY'){ # # -### *real* end of Conf ;-) ##################################################### +### *real* end of Conf ;-) ##################################################### \ No newline at end of file diff --git a/selfforum-cgi/shared/Id.pm b/selfforum-cgi/shared/Id.pm index 8e91379..4d09143 100644 --- a/selfforum-cgi/shared/Id.pm +++ b/selfforum-cgi/shared/Id.pm @@ -4,7 +4,7 @@ package Id; # # # File: shared/Id.pm # # # -# Authors: André Malo , 2001-05-03 # +# Authors: André Malo # # # # Description: compose an unique ID (in CGI context) # # # @@ -14,14 +14,17 @@ use strict; use vars qw( @table @EXPORT - $VERSION ); ################################################################################ # # 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'} ################################################################################ # diff --git a/selfforum-cgi/shared/Lock.pm b/selfforum-cgi/shared/Lock.pm index 55ab59f..6dbef1a 100644 --- a/selfforum-cgi/shared/Lock.pm +++ b/selfforum-cgi/shared/Lock.pm @@ -2,20 +2,15 @@ package Lock; ################################################################################ # # -# File: shared/Locked.pm # +# File: shared/Lock.pm # # # -# Authors: Andre Malo , 2001-05-25 # +# Authors: André Malo # # # # Description: Locking and Filehandle class # # # ################################################################################ use strict; -use vars qw( - $VERSION -); - -use diagnostics; use vars qw($module); use Fcntl; @@ -24,7 +19,11 @@ use Fcntl; # # 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'} ################################################################################ # @@ -59,19 +58,6 @@ use constant LH_MASTER => 3; use base 'Exporter'; @Lock::EXPORT = qw(LH_SHARED LH_EXCL LH_EXSH LH_MASTER); -############### -# !!!!!!!!!!!!!!!!! -# remove the following later -############### -package Locked; -use constant LH_SHARED => 0; -use constant LH_EXCL => 1; -use constant LH_EXSH => 2; -use constant LH_MASTER => 3; - -use base 'Exporter'; -@Locked::EXPORT = qw(LH_SHARED LH_EXCL LH_EXSH LH_MASTER); - # keep require happy 1; diff --git a/selfforum-cgi/shared/Template.pm b/selfforum-cgi/shared/Template.pm index 50103d2..0400ec7 100644 --- a/selfforum-cgi/shared/Template.pm +++ b/selfforum-cgi/shared/Template.pm @@ -4,8 +4,8 @@ package Template; # # # File: shared/Template.pm # # # -# Authors: André Malo , 2001-07-01 # -# Frank Schoenmann , 2001-06-04 # +# Authors: André Malo # +# Frank Schönmann # # # # Description: Handle XML based HTML-Templates # # # @@ -14,13 +14,9 @@ package Template; use strict; use vars qw( $xml_dom_used - $VERSION ); -use Carp qw( - croak - confess -); +use Carp qw(croak); BEGIN { $xml_dom_used = eval q[ @@ -34,7 +30,11 @@ BEGIN { # # 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 #################################################################### @@ -107,30 +107,13 @@ sub insert { # sub list { my $self = shift; + my $name = shift; croak "no template file specified" unless (defined $self -> {file}); - $self -> joinlist ('' => @_); -} - -### sub joinlist ############################################################### -# -# fill in a complete list, using a scrap between the list elements -# -# Params: $join - joining string (or stringref) -# $name - name of the atomic list scrap -# $array - list of hashes (same strcuture like the hash used by 'scrap') -# -# Return: scalar reference - filled in list -# -sub joinlist { - my $self = shift; - my $join = shift; - $join = $$join if ref($join); - my $name = shift; - - my $list = join $join => map { ${ $self -> scrap ($name, $_) } } @{ +shift }; +# no warnings 'uninitialized'; + my $list = join '' => map { ${ $self -> scrap ($name, $_) } } @{ +shift }; # return \$list; @@ -215,42 +198,6 @@ sub scrap { \$scrap; } -### printscrap () ############################################################## -# -# fill in a template scrap and print to STDOUT -# -# Params: $name name of the scrap -# ... -# $no_nl 1 - remove newlines (\n) -# 0 - do no such thing -# -# Return: success code (boolean) -# -sub printscrap { - my $self = shift; - - $self -> scrap2file (\*STDOUT, @_); -} - -### scrap2file () ############################################################## -# -# fill in a template scrap and print to a file handle -# -# Params: $handle filehandle -# $name name of the scrap -# ... -# $no_nl 1 - remove newlines (\n) -# 0 - do no such thing -# -# Return: success code (boolean) -# -sub scrap2file { - my $self = shift; - my $handle = shift; - - print $handle ${$self->scrap(@_)}; -} - ### sub parse_file ############################################################# # # read in and parse template file