summaryrefslogtreecommitdiff
path: root/index.fpl
blob: 11be5fc8a9460e3a1a2853afd3e6d2e306a24d4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl

use strict;
use warnings;

use Xerl;

use FCGI;
use Socket;
use Sys::Hostname;

my $host = hostname();
my $config =
  -e "xerldev-$host.conf"
  ? "xerldev-$host.conf"
  : ( -e "xerl-$host.conf" ? "xerl-$host.conf" : 'config.conf' );

while ( FCGI::accept >= 0 ) {
    my Xerl $xerl = Xerl->new( config => $config );
    $xerl->run();
}