From: Moritz Bunkus Date: Wed, 22 Aug 2012 15:50:37 +0000 (+0200) Subject: Auch das Installationsbasisverzeichnis in @INC aufnehmen X-Git-Tag: release-3.0.0beta1~275^2~10 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=32822bba14006768f13e0f53e617dd1ca204f1c8;p=kivitendo-erp.git Auch das Installationsbasisverzeichnis in @INC aufnehmen Hintergrund ist konditionales Requiren von SL-Modulen, wenn vorher ein chdir gemacht wurde (blöder alter Code, der chdirt...). --- 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);