annotate public_html/cgi-bin/handler.pl @ 14:d997ff96acf1

sync
author sergey
date Mon, 19 May 2014 18:34:16 +0400
parents aac1085b256d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
aac1085b256d initial commit
cin
parents:
diff changeset
1 #!/usr/bin/perl -wT
aac1085b256d initial commit
cin
parents:
diff changeset
2 #-d:NYTProf
aac1085b256d initial commit
cin
parents:
diff changeset
3 use strict;
aac1085b256d initial commit
cin
parents:
diff changeset
4
aac1085b256d initial commit
cin
parents:
diff changeset
5 BEGIN {
aac1085b256d initial commit
cin
parents:
diff changeset
6 require "./_config.pm";
aac1085b256d initial commit
cin
parents:
diff changeset
7 }
aac1085b256d initial commit
cin
parents:
diff changeset
8
aac1085b256d initial commit
cin
parents:
diff changeset
9 use CGI;
aac1085b256d initial commit
cin
parents:
diff changeset
10 use IMPL::require {
aac1085b256d initial commit
cin
parents:
diff changeset
11 TApp => 'Benzin::Web::Application'
aac1085b256d initial commit
cin
parents:
diff changeset
12 };
aac1085b256d initial commit
cin
parents:
diff changeset
13
aac1085b256d initial commit
cin
parents:
diff changeset
14 eval {
aac1085b256d initial commit
cin
parents:
diff changeset
15 my $instance = TApp->spawn;
aac1085b256d initial commit
cin
parents:
diff changeset
16
aac1085b256d initial commit
cin
parents:
diff changeset
17 $instance->Run();
aac1085b256d initial commit
cin
parents:
diff changeset
18 };
aac1085b256d initial commit
cin
parents:
diff changeset
19 if ($@) {
aac1085b256d initial commit
cin
parents:
diff changeset
20 print CGI::header(-status => 500, type => 'text/plain');
aac1085b256d initial commit
cin
parents:
diff changeset
21 print $@;
aac1085b256d initial commit
cin
parents:
diff changeset
22 }