3
# Foswiki - The Free and Open Source Wiki, http://foswiki.org/
5
# Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org and TWiki Contributors
6
# Copyright (C) 2008-2009 Foswiki Contributors.
7
# All Rights Reserved. TWiki Contributors and Foswiki Contributors
8
# are listed in the AUTHORS file in the root of this distribution.
9
# NOTE: Please extend that file, not this notice.
11
# This program is free software; you can redistribute it and/or
12
# modify it under the terms of the GNU General Public License
13
# as published by the Free Software Foundation; either version 2
14
# of the License, or (at your option) any later version. For
15
# more details read LICENSE in the root of this distribution.
17
# This program is distributed in the hope that it will be useful,
18
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21
# As per the GPL, removal of this notice is prohibited.
28
if ( defined $ENV{GATEWAY_INTERFACE} ) {
29
$Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI';
30
use CGI::Carp qw(fatalsToBrowser);
31
$SIG{__DIE__} = \&CGI::Carp::confess;
34
$Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI';
36
$SIG{__DIE__} = \&Carp::confess;
38
$ENV{FOSWIKI_ACTION} = 'manage';
39
@INC = ('.', grep { $_ ne '.' } @INC);
45
$Foswiki::engine->run();