# #
# File: shared/CheckRFC.pm #
# #
-# Authors: Andre Malo <nd@o3media.de>, 2001-04-14 #
+# Authors: André Malo <nd@o3media.de> #
# #
# Description: implement several string checks on RFC correctness #
# #
@email
@EXPORT
@ISA
- $VERSION
);
$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'}
################################################################################
#
}
}
-# keeping require happy
+# keep 'require' happy
1;
#
# #
# File: shared/Conf.pm #
# #
-# Authors: Andre Malo <nd@o3media.de>, 2001-06-16 #
+# Authors: André Malo <nd@o3media.de> #
# #
# Description: read and parse configuration files #
# #
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'}
################################################################################
#
# $Shared - /path/to/shared-dir # -- " --
# $Script - scriptname
#
-# Return: hashref of config hash
-#
sub read_script_conf ($$$) {
my ($Config, $Shared, $Script) = @_;
#
#
-### *real* end of Conf ;-) #####################################################
+### *real* end of Conf ;-) #####################################################
\ No newline at end of file
# #
# File: shared/Id.pm #
# #
-# Authors: André Malo <nd@o3media.de>, 2001-05-03 #
+# Authors: André Malo <nd@o3media.de> #
# #
# Description: compose an unique ID (in CGI context) #
# #
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'}
################################################################################
#
################################################################################
# #
-# File: shared/Locked.pm #
+# File: shared/Lock.pm #
# #
-# Authors: Andre Malo <nd@o3media.de>, 2001-05-25 #
+# Authors: André Malo <nd@o3media.de> #
# #
# Description: Locking and Filehandle class #
# #
################################################################################
use strict;
-use vars qw(
- $VERSION
-);
-
-use diagnostics;
use vars qw($module);
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'}
################################################################################
#
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;
# #
# File: shared/Template.pm #
# #
-# Authors: André Malo <nd@o3media.de>, 2001-07-01 #
-# Frank Schoenmann <fs@tower.de>, 2001-06-04 #
+# Authors: André Malo <nd@o3media.de> #
+# Frank Schönmann <fs@tower.de> #
# #
# Description: Handle XML based HTML-Templates #
# #
use strict;
use vars qw(
$xml_dom_used
- $VERSION
);
-use Carp qw(
- croak
- confess
-);
+use Carp qw(croak);
BEGIN {
$xml_dom_used = eval q[
#
# 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 ####################################################################
#
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;
\$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