root/lang/perl/NanoA/trunk/nanoa.pl @ 24100

Revision 23997, 493 bytes (checked in by kazuho, 6 years ago)

add nanoa-conf.cgi to declare data_dir, update code to respect that value, enable utf8 flag

  • Property svn:executable set to *
Line 
1use strict;
2use warnings;
3use utf8;
4
5if ($ENV{MOD_PERL}) {
6    my $base_dir = $ENV{SCRIPT_FILENAME};
7    $base_dir =~ s|/[^/]*$||;
8    chdir $base_dir;
9}
10unshift @INC, 'extlib';
11
12do {
13    local $@;
14    local $SIG{__DIE__} = sub {
15        die $_[0]
16            if ref $_[0] eq 'HASH' && $_[0]->{finished};
17        NanoA::DebugScreen::build(@_);
18    };
19    eval {
20        NanoA::Dispatch->dispatch();
21    };
22    if ($@ && ref $@ eq 'HASH' && $@->{finished}) {
23        # just ignore
24    }
25};
26
271;
Note: See TracBrowser for help on using the browser.