From: <de...@de...> - 2017-04-07 18:20:48
|
Author: HaraldJoerg Date: 2017-04-07 18:20:37 +0000 (Fri, 07 Apr 2017) New Revision: 30317 Trac url: http://develop.twiki.org/trac/changeset/30317 Modified: twiki/trunk/core/bin/attach twiki/trunk/core/bin/changes twiki/trunk/core/bin/copy twiki/trunk/core/bin/edit twiki/trunk/core/bin/login twiki/trunk/core/bin/logon twiki/trunk/core/bin/manage twiki/trunk/core/bin/mdrepo twiki/trunk/core/bin/oops twiki/trunk/core/bin/preview twiki/trunk/core/bin/rdiff twiki/trunk/core/bin/rdiffauth twiki/trunk/core/bin/register twiki/trunk/core/bin/rename twiki/trunk/core/bin/resetpasswd twiki/trunk/core/bin/rest twiki/trunk/core/bin/save twiki/trunk/core/bin/search twiki/trunk/core/bin/statistics twiki/trunk/core/bin/twiki_cgi twiki/trunk/core/bin/upload twiki/trunk/core/bin/view twiki/trunk/core/bin/viewauth twiki/trunk/core/bin/viewfile Log: Item7796: Activate TWiki's lib directories before using CGI::Carp Modified: twiki/trunk/core/bin/attach =================================================================== --- twiki/trunk/core/bin/attach 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/attach 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'attach'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/changes =================================================================== --- twiki/trunk/core/bin/changes 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/changes 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'changes'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/copy =================================================================== --- twiki/trunk/core/bin/copy 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/copy 2017-04-07 18:20:37 UTC (rev 30317) @@ -2,7 +2,7 @@ # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # -# Copyright (C) 1999-2012 Peter Thoeny, peter[at]thoeny.org and +# Copyright (C) 1999-2017 Peter Thoeny, peter[at]thoeny.org and # TWiki Contributors. All Rights Reserved. TWiki Contributors are # listed in the AUTHORS file in the root of this distribution. # @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'copy'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/edit =================================================================== --- twiki/trunk/core/bin/edit 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/edit 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'edit'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/login =================================================================== --- twiki/trunk/core/bin/login 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/login 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'login'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/logon =================================================================== --- twiki/trunk/core/bin/logon 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/logon 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'logon'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/manage =================================================================== --- twiki/trunk/core/bin/manage 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/manage 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'manage'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/mdrepo =================================================================== --- twiki/trunk/core/bin/mdrepo 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/mdrepo 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'mdrepo'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/oops =================================================================== --- twiki/trunk/core/bin/oops 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/oops 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'oops'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/preview =================================================================== --- twiki/trunk/core/bin/preview 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/preview 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'preview'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/rdiff =================================================================== --- twiki/trunk/core/bin/rdiff 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/rdiff 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'rdiff'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/rdiffauth =================================================================== --- twiki/trunk/core/bin/rdiffauth 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/rdiffauth 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'rdiffauth'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/register =================================================================== --- twiki/trunk/core/bin/register 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/register 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'register'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/rename =================================================================== --- twiki/trunk/core/bin/rename 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/rename 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'rename'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/resetpasswd =================================================================== --- twiki/trunk/core/bin/resetpasswd 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/resetpasswd 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'resetpasswd'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/rest =================================================================== --- twiki/trunk/core/bin/rest 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/rest 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'rest'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/save =================================================================== --- twiki/trunk/core/bin/save 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/save 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'save'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/search =================================================================== --- twiki/trunk/core/bin/search 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/search 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'search'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/statistics =================================================================== --- twiki/trunk/core/bin/statistics 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/statistics 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'statistics'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/twiki_cgi =================================================================== --- twiki/trunk/core/bin/twiki_cgi 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/twiki_cgi 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -33,8 +35,6 @@ exit(1); } delete $ENV{TWIKI_ACTION} if exists $ENV{TWIKI_ACTION}; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/upload =================================================================== --- twiki/trunk/core/bin/upload 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/upload 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'upload'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/view =================================================================== --- twiki/trunk/core/bin/view 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/view 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'view'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/viewauth =================================================================== --- twiki/trunk/core/bin/viewauth 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/viewauth 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'viewauth'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; Modified: twiki/trunk/core/bin/viewfile =================================================================== --- twiki/trunk/core/bin/viewfile 2017-04-03 20:59:36 UTC (rev 30316) +++ twiki/trunk/core/bin/viewfile 2017-04-07 18:20:37 UTC (rev 30317) @@ -23,9 +23,11 @@ use warnings; BEGIN { + @INC = ('.', grep { $_ ne '.' } @INC); + require 'setlib.cfg'; if ( defined $ENV{GATEWAY_INTERFACE} or defined $ENV{MOD_PERL} ) { $TWiki::cfg{Engine} = 'TWiki::Engine::CGI'; - use CGI::Carp qw(fatalsToBrowser); + require CGI::Carp; CGI::Carp->import(qw(fatalsToBrowser)); $SIG{__DIE__} = \&CGI::Carp::confess; } else { @@ -34,8 +36,6 @@ $SIG{__DIE__} = \&Carp::confess; } $ENV{TWIKI_ACTION} = 'viewfile'; - @INC = ('.', grep { $_ ne '.' } @INC); - require 'setlib.cfg'; } use TWiki; |