From 32822bba14006768f13e0f53e617dd1ca204f1c8 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 22 Aug 2012 17:50:37 +0200 Subject: [PATCH] Auch das Installationsbasisverzeichnis in @INC aufnehmen MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Hintergrund ist konditionales Requiren von SL-Modulen, wenn vorher ein chdir gemacht wurde (blöder alter Code, der chdirt...). --- SL/Dispatcher.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SL/Dispatcher.pm b/SL/Dispatcher.pm index 9083b8df6..5b912232b 100644 --- a/SL/Dispatcher.pm +++ b/SL/Dispatcher.pm @@ -3,8 +3,12 @@ package SL::Dispatcher; use strict; BEGIN { - unshift @INC, "modules/override"; # Use our own versions of various modules (e.g. YAML). - push @INC, "modules/fallback"; # Only use our own versions of modules if there's no system version. + use SL::System::Process; + my $exe_dir = SL::System::Process::exe_dir; + + unshift @INC, "${exe_dir}/modules/override"; # Use our own versions of various modules (e.g. YAML). + push @INC, "${exe_dir}/modules/fallback"; # Only use our own versions of modules if there's no system version. + unshift @INC, $exe_dir; } use CGI qw( -no_xhtml); -- 2.20.1