1 |
#!/usr/bin/perl |
#!/usr/bin/perl |
2 |
|
|
|
# Copyright (C) 2008, Sebastian Riedel. |
|
|
|
|
3 |
use strict; |
use strict; |
4 |
use warnings; |
use warnings; |
5 |
|
|
6 |
|
# debug enviroment vars |
7 |
|
$ENV{MOJO_TEMPLATE_DEBUG} = 1; |
8 |
|
$ENV{MOJO_LOADER_DEBUG} = 1; |
9 |
|
#$ENV{MOJO_BASE_DEBUG} = 1; |
10 |
|
$ENV{MOJO_SERVER_DEBUG} = 1; |
11 |
|
$ENV{MOJOX_ROUTES_DEBUG} = 1; |
12 |
|
$ENV{MOJO_RELOAD} = 1; |
13 |
|
|
14 |
use FindBin; |
use FindBin; |
15 |
|
|
16 |
use lib "$FindBin::Bin/lib"; |
use lib "$FindBin::Bin/lib"; |
24 |
if ($@) { |
if ($@) { |
25 |
print <<EOF; |
print <<EOF; |
26 |
It looks like you don't have the Mojo Framework installed. |
It looks like you don't have the Mojo Framework installed. |
27 |
Please visit http://getmojo.kraih.com for detailed installation instructions. |
Please visit http://getmojo.kraih.com for detailed installation instructions |
28 |
|
or try to run Fray with one of other supported servers. |
29 |
|
|
30 |
EOF |
EOF |
31 |
exit; |
exit; |
33 |
|
|
34 |
# Start the script system |
# Start the script system |
35 |
my $scripts = Mojolicious::Scripts->new; |
my $scripts = Mojolicious::Scripts->new; |
36 |
$scripts->run(@ARGV); |
$scripts->run(@ARGV || 'daemon'); |