![]() ![]() Do this as an ordinary user, not as root or administrator. Windows users must also see "Differences when using this module under Win32".ĭownload and unpack the local::lib tarball from CPAN (search for "Download" on the CPAN page about local::lib). Without this, you would still install the modules into the system CPAN installation and also your Perl scripts will not use the lib/ path you bootstrapped with local::lib.īy default local::lib installs itself and the CPAN modules into ~/perl5. In this case, you'll need to install local::lib in your home directory.Įven if you do have administrative privileges, you will still want to set up your environment variables, as discussed in step 4. You would do this if your system administrator hasn't already installed local::lib. bashrc file - eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)" The bootstrapping techniqueĪ typical way to install local::lib is using what is known as the "bootstrapping" technique. PERL_LOCAL_LIB_ROOT="/home/usename/perl5:$PERL_LOCAL_LIB_ROOT" export PERL_LOCAL_LIB_ROOT įrom a. PATH="/home/username/perl5/bin:$PATH" export PATH PERL5LIB="/home/username/perl5/lib/perl5" export PERL5LIB ![]() PERL_MM_OPT='INSTALL_BASE=/home/username/perl5' export PERL_MM_OPT PERL_MB_OPT='-install_base /home/username/perl5' export PERL_MB_OPT Perl -MCPAN -Mlocal::lib -e 'CPAN::install(LWP)' ![]() Use local::lib "$FindBin::Bin/./support" # app-local support libraryįrom the shell - # Install LWP and its missing dependencies to the '~/perl5' directory In code - use local::lib # sets up a local lib at ~/perl5 Local::lib - create and use a local lib/ for perl modules with PERL5LIB SYNOPSIS
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |