2 ms·
Best method to achieve that is one of 2 options: perlbrew local::lib Or, specify it when executing the module, ie: bash$ perl -I../project_modules/Modu
by nopacience 8y ago
Best method to achieve that is one of 2 options:
perlbrew
local::lib
Or, specify it when executing the module, ie:
bash$ perl -I../project_modules/Module1/lib -I../project_modules/Module2/lib your_project.pl
Or, specify it at the top of your_project.pl ie:
use lib '../project_modules/Module1/lib';
use lib '../project_modules/Module2/lib';
Or, set enviroment var
export PERL5LIB=/home/project_modules/ ; perl your_project.pl
Or, make a BEGIN statement on top of your main project, ie:
BEGIN {
push @INC, glob "/home/project_modules/*/lib";
}
You dont need to use anything global, and its better you dont. Never execute anything as root. You are able to execute local modules just like node, rvm, etc. Its all the same.
Some linux installs come with perl/python installed. It is used by the system and is refered to as "system perl" or "system python" or "system ruby", etc.. and it is not recommended to make upgrade on those "system XXX". Only your system should upgrade the libraries it uses. That is why you should always use a local perl/python/ruby install.
If you didnt like it, its good you moved on.
- petre 8y agoI use plenv instead of perlbrew. It's written in shell script and bugs are actually fixed in a timely manner.