igoryonya has asked for the wisdom of the Perl Monks concerning the following question:
libdirAre there some variables or standard modules, that can determain standard system dirs, depending on which os the perl program is being launched?
progdir
confdir
homedir
userdir
When this library will be called, perl program doesn't need to know it's, since it will be already located in one of the paths, that perl looks in.#Determine 1 path, except for cwd (current working directory), #Where perl looks for libraries: my $libPath = ''; for(@INC){ unless($_ eq '.'){ $libPath = $_; last; } } #Then, install the library, that will determain all the OS specific pa +ths, #that can be used for further execution and installation of perl progr +am.
Running this code on 2 OSes, gave me the following results, so far:
Lin: /etc/perl Win: C:/Perl/site/lib
|
---|