--- bin/attach.old Fri Jul 4 14:22:47 2008 +++ bin/attach Fri Jun 27 23:35:35 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -24,6 +24,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/changes.old Fri Jul 4 14:49:20 2008 +++ bin/changes Fri Jun 27 23:35:47 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -24,6 +24,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/edit.old Fri Jul 4 15:02:04 2008 +++ bin/edit Fri Jun 27 23:36:03 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -24,6 +24,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/logon.old Fri Jul 4 15:07:21 2008 +++ bin/logon Fri Jun 27 23:36:17 2008 @@ -30,6 +30,16 @@ } # Set library paths in @INC, at compile time unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/manage.old Fri Jul 4 15:08:29 2008 +++ bin/manage Fri Jun 27 23:36:29 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -25,6 +25,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/oops.old Fri Jul 4 15:09:49 2008 +++ bin/oops Fri Jun 27 23:35:21 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -24,6 +24,17 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } + require 'setlib.cfg'; } --- bin/preview.old Fri Jul 4 15:15:50 2008 +++ bin/preview Fri Jun 27 23:36:40 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -24,6 +24,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/rdiff.old Fri Jul 4 15:17:42 2008 +++ bin/rdiff Fri Jun 27 23:36:49 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -24,6 +24,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/rdiffauth.old Fri Jul 4 15:23:26 2008 +++ bin/rdiffauth Fri Jun 27 23:36:59 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -24,6 +24,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/register.old Fri Jul 4 15:24:38 2008 +++ bin/register Fri Jun 27 23:34:57 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -23,6 +23,17 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } + require 'setlib.cfg'; } --- bin/rename.old Fri Jul 4 15:26:25 2008 +++ bin/rename Fri Jun 27 23:37:09 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -24,6 +24,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/resetpasswd.old Fri Jul 4 15:29:13 2008 +++ bin/resetpasswd Fri Jun 27 23:37:22 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -23,6 +23,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/rest.old Fri Jul 4 15:37:16 2008 +++ bin/rest Fri Jun 27 23:37:36 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -27,6 +27,16 @@ # Set library paths in @INC, at compile time unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/save.old Fri Jul 4 15:43:56 2008 +++ bin/save Fri Jun 27 23:37:47 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -24,6 +24,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/search.old Fri Jul 4 15:48:01 2008 +++ bin/search Fri Jun 27 23:37:56 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w #-d:DProf # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ @@ -25,6 +25,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/setlib.cfg_old Fri Jul 4 00:20:22 2008 +++ bin/setlib.cfg Fri Jun 27 23:04:44 2008 @@ -28,12 +28,16 @@ eval 'require "LocalLib.cfg"'; +use File::Spec; + +my $rel_lib = File::Spec->catdir(File::Spec->updir, 'lib'); + unless (( defined ($twikiLibPath) ) and (-e $twikiLibPath)) { use Cwd qw( abs_path ); - ( $twikiLibPath ) = ($twikiLibPath = Cwd::abs_path( "../lib" )) =~ /(.*)/; + ( $twikiLibPath ) = ($twikiLibPath = Cwd::abs_path( $rel_lib )) =~ /(.*)/; } if ($twikiLibPath eq "") { - $twikiLibPath = "../lib"; + $twikiLibPath = $rel_lib; warn "using relative path for libs - some plugins may break"; } --- bin/statistics.old Fri Jul 4 15:50:34 2008 +++ bin/statistics Fri Jun 27 23:38:09 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -33,6 +33,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/upload.old Fri Jul 4 15:51:40 2008 +++ bin/upload Fri Jun 27 23:38:22 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -24,6 +24,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/view.old Fri Jul 4 15:54:27 2008 +++ bin/view Fri Jul 4 15:55:30 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -24,6 +24,16 @@ } # Set library paths in @INC, at compile time unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/viewauth.old Fri Jul 4 15:59:52 2008 +++ bin/viewauth Fri Jun 27 23:38:31 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -24,6 +24,16 @@ } # Set library paths in @INC, at compile time unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; } --- bin/viewfile.old Fri Jul 4 16:01:00 2008 +++ bin/viewfile Fri Jun 27 23:38:43 2008 @@ -1,4 +1,4 @@ -#!/usr/bin/perl -wT +#!/usr/bin/perl -w # # TWiki Enterprise Collaboration Platform, http://TWiki.org/ # @@ -24,6 +24,16 @@ chdir $1; } unshift @INC, '.'; + + # VMS mod_perl can end up with %INC already having setlib.cfg in it + # from a previous displayed page, so we need to remove it, or the + # @INC array does not get set up. + if ($^O eq 'VMS') { + my $setlib = $INC{'setlib.cfg'}; + delete $INC{'setlib.cfg'} if $setlib; + my $locallib = $INC{'LocalLib.cfg'}; + delete $INC{'LocalLib.cfg'} if $locallib; + } require 'setlib.cfg'; }