[go: up one dir, main page]

Menu

[r3]: / cgi.pl  Maximize  Restore  History

Download this file

96 lines (87 with data), 3.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!C:\Perl\bin\perl.exe -w
#
# Copyright 2008 Samuel Borsutzky
#
# This file is part of PerlForms.
#
# PerlForms is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# PerlForms is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with PerlForms. If not, see <http://www.gnu.org/licenses/>.
#
#
#
#
# Add new object checklist: (what=name der neuen perlforms-klasse)
#
# - PerlForms::Dictionary: %dict: idattrib
# - PerlForms::Dictionary: %dict: pm
# - PerlForms::Dictionary: %dict: schoen (optional, default: capitalized what)
# - PerlForms::Dictionary: %dict: storage (optional, default: perlformsdb)
# - PerlForms::Dictionary: %dict: tablename (optional, default: what)
# - PerlForms::Dictionary: %dict: parent (optional)
# - PerlForms::Dictionary: %dict: child (optional)
# - PerlForms::Dictionary: %dict: attribs: min. id, name, <abkuerz>, <what>
# - PerlForms::Dictionary: %dict: attribs: order: alle atribute eintragen (für PerlForms->form)
# - PerlForms::Dict::Apps: %prgs: objects (wird für class->legal und somit für object->show benötigt)
# - PerlForms::Dict::Apps: %prgs: navlinks (optional, wenn ein link in der navbar stehen soll)
# - package <what> (.pm) anlegen (optional; use base qw(PerlForms::Object);)
# - Query: subs <what> und <what>_list (optional, falls default und default_list
# nicht ausreichen)
# - add .pm to INSTALL*
#
#
#
# todo Policy: undef=unbekannt, ""=leer/n.n.definiert
#
#
#
# Style-Guide
#
# - Einrückung: Vier Leerzeichen (nicht Tab) pro Ebene.
#
# - "new"-Syntax: Klasse->new();
# Bei syntax "new Form" kommt fehlermldg, es gebe keine sub Form PerlForms..
# das hat damit zu tun, dass Perl die syntax "new Form" nicht richtig parsen
# kann, da damit ja auch &new(Form) gemeint sein könnte, also das sub new
# weiter unten.
#
# - my: my$test my%bla ... aber: my($a,$b)
#
# - if/while/foreach-Blöcke: Öffnende { am Ende der der if/while/foreach-Zeile.
# Schließende } auf neuer Zeile bündig mit dem if/while/foreach.
#
#
#
#
# Design-Policy
#
# - pfmodules(Funcdep,NagUtil(,PerlForms=Root))
# - apps(ldap,funcdep,logdb)
#
#
#
#
use strict;
use PerlForms::HTML::REQ;
use PerlForms::Util qw(&epoch2date);
use vars qw($debug);
$debug=1 unless(defined($debug));
my($starttime)=time();
if($debug) {
print(STDERR "\n######### cgi.pl called at ".&epoch2date($starttime)." #########\n");
print(STDERR "URI: ".$ENV{REQUEST_URI}."\n");
}
PerlForms::HTML::REQ->new(scriptname=>__FILE__)->process_httpreq;
if($debug or $starttime) {
my($endtime)=time();
print(STDERR "######### cgi.pl ended at ".&epoch2date($endtime)." (duration: ".($endtime-$starttime)."s) #########\n");
}