1 package SL::System::Process;
5 use parent qw(Rose::Object);
7 use English qw(-no_match_vars);
11 use List::Util qw(first);
16 return $cached_exe_dir if defined $cached_exe_dir;
18 my $bin_dir = File::Spec->rel2abs($FindBin::Bin);
19 my @dirs = File::Spec->splitdir($bin_dir);
21 $cached_exe_dir = first { -f File::Spec->catdir(@dirs[0..$_], 'SL', 'System', 'TaskServer.pm') }
22 reverse(0..scalar(@dirs) - 1);
23 $cached_exe_dir = defined($cached_exe_dir) ? File::Spec->catdir(@dirs[0..$cached_exe_dir]) : File::Spec->curdir;
25 return $cached_exe_dir;
37 SL::System::Process - assorted system-relevant functions
41 # Get base path to kivitendo scripts
42 my $path = SL::System::Process->exe_dir;
50 Returns the absolute path to the directory the kivitendo executables
51 (C<login.pl> etc.) and modules (sub-directory C<SL/> etc.) are located
62 Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>