Revision 4ab40559
Von Moritz Bunkus vor mehr als 12 Jahren hinzugefügt
scripts/task_server.pl | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
|
5 | 5 |
BEGIN { |
6 |
require Cwd; |
|
6 |
use SL::System::Process; |
|
7 |
my $exe_dir = SL::System::Process::exe_dir; |
|
7 | 8 |
|
8 |
my $dir = $0;
|
|
9 |
$dir = Cwd::getcwd() . '/' . $dir unless $dir =~ m|^/|;
|
|
10 |
$dir =~ s|[^/]+$|..|;
|
|
9 |
unshift @INC, "${exe_dir}/modules/override"; # Use our own versions of various modules (e.g. YAML).
|
|
10 |
push @INC, "${exe_dir}/modules/fallback"; # Only use our own versions of modules if there's no system version.
|
|
11 |
unshift @INC, $exe_dir;
|
|
11 | 12 |
|
12 |
chdir($dir) || die "Cannot change directory to ${dir}\n"; |
|
13 |
|
|
14 |
unshift @INC, "modules/override"; # Use our own versions of various modules (e.g. YAML). |
|
15 |
push @INC, "modules/fallback"; # Only use our own versions of modules if there's no system version. |
|
13 |
chdir($exe_dir) || die "Cannot change directory to ${exe_dir}\n"; |
|
16 | 14 |
} |
17 | 15 |
|
18 | 16 |
use CGI qw( -no_xhtml); |
Auch abrufbar als: Unified diff
Task-Server: Absolute Pfade für @INC verwenden
Außerdem Wiederverwendung von SL::System::Process, um das
kivitendo-Systemverzeichnis zu finden.