~kosova/+junk/tuxfamily-twiki

« back to all changes in this revision

Viewing changes to foswiki/bin/manage.pl

  • Committer: James Michael DuPont
  • Date: 2009-07-18 19:58:49 UTC
  • Revision ID: jamesmikedupont@gmail.com-20090718195849-vgbmaht2ys791uo2
added foswiki

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl -wT
 
2
#
 
3
# Foswiki - The Free and Open Source Wiki, http://foswiki.org/
 
4
#
 
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.
 
10
#
 
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.
 
16
#
 
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.
 
20
#
 
21
# As per the GPL, removal of this notice is prohibited.
 
22
 
 
23
 
 
24
use strict;
 
25
use warnings;
 
26
 
 
27
BEGIN {
 
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;
 
32
    }
 
33
    else {
 
34
        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI';
 
35
        require Carp;
 
36
        $SIG{__DIE__} = \&Carp::confess;
 
37
    }
 
38
    $ENV{FOSWIKI_ACTION} = 'manage';
 
39
    @INC = ('.', grep { $_ ne '.' } @INC);
 
40
    require 'setlib.cfg';
 
41
}
 
42
 
 
43
use Foswiki;
 
44
use Foswiki::UI;
 
45
$Foswiki::engine->run();