-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathadiary.cgi
executable file
·54 lines (48 loc) · 1.43 KB
/
adiary.cgi
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
#!/usr/bin/perl
use strict;
unshift(@INC, './lib');
#-------------------------------------------------------------------------------
# Satsuki system - Startup routine (for CGI)
# Copyright (C)2005-2023 nabe@abk
#-------------------------------------------------------------------------------
# Last Update : 2023/02/02
#
BEGIN {
if ($] < 5.014) {
my $v = int($]); my $sb = int(($]-$v)*1000);
print "Content-Type: text/html;\n\n";
print "Do not work with <u>Perl $v.$sb</u>.<br>Requires <strong>Perl 5.14 or newer</strong>.";
exit(-1);
}
};
#-------------------------------------------------------------------------------
eval {
require Satsuki::Base;
#---------------------------------------------------
# 時間計測開始
#---------------------------------------------------
my $timer;
if ($ENV{SatsukiTimer}) {
require Satsuki::Timer;
$timer = Satsuki::Timer->new();
$timer->start();
}
#---------------------------------------------------
# メイン
#---------------------------------------------------
my $ROBJ = Satsuki::Base->new(); # ルートオブジェクト生成
$ROBJ->{Timer} = $timer; # タイマーの保存
$ROBJ->start_up();
$ROBJ->finish();
};
#-------------------------------------------------
# エラー表示
#-------------------------------------------------
if (!$ENV{SatsukiExit} && $@) {
print <<HTML;
Status: 500 Internal Server Error
Content-Type: text/plain; charset=UTF-8
X-Br: <br>
$@
HTML
}