source: tags/FoswikiRelease01x01x06/core/bin/view @ 16746

Revision 15407, 1.7 KB checked in by GeorgeClark, 8 months ago (diff)

Item12081: set consistent #! shebang in scripts

This way rewriteshebang.pl can be used to switch back to /usr/bin/perl
and restore all files to unmodified state.

  • Property svn:executable set to *
Line 
1#! /usr/bin/perl -wT
2# See bottom of file for license and copyright information
3use strict;
4use warnings;
5
6BEGIN {
7    if ( defined $ENV{GATEWAY_INTERFACE} || defined $ENV{MOD_PERL} ) {
8        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CGI';
9        use CGI::Carp qw(fatalsToBrowser);
10        $SIG{__DIE__} = \&CGI::Carp::confess;
11    }
12    else {
13        $Foswiki::cfg{Engine} = 'Foswiki::Engine::CLI';
14        require Carp;
15        $SIG{__DIE__} = \&Carp::confess;
16    }
17    $ENV{FOSWIKI_ACTION} = 'view';
18    @INC = ( '.', grep { $_ ne '.' } @INC );
19    require 'setlib.cfg';
20}
21
22use Foswiki     ();
23use Foswiki::UI ();
24$Foswiki::engine->run();
25__END__
26Foswiki - The Free and Open Source Wiki, http://foswiki.org/
27
28Copyright (C) 2008-2010 Foswiki Contributors. Foswiki Contributors
29are listed in the AUTHORS file in the root of this distribution.
30NOTE: Please extend that file, not this notice.
31
32Additional copyrights apply to some or all of the code in this
33file as follows:
34
35Copyright (C) 1999-2007 Peter Thoeny, peter@thoeny.org
36and TWiki Contributors. All Rights Reserved. TWiki Contributors
37are listed in the AUTHORS file in the root of this distribution.
38
39This program is free software; you can redistribute it and/or
40modify it under the terms of the GNU General Public License
41as published by the Free Software Foundation; either version 2
42of the License, or (at your option) any later version. For
43more details read LICENSE in the root of this distribution.
44
45This program is distributed in the hope that it will be useful,
46but WITHOUT ANY WARRANTY; without even the implied warranty of
47MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48
49As per the GPL, removal of this notice is prohibited.
Note: See TracBrowser for help on using the repository browser.