Bureaucrats, cc_docs_admin, cc_staff
2,318
edits
(Created page with "{{Draft}} == Description == [http://www.perl.org Perl] is a free programming language which is interpreted and has acquired a vast library of contributed packages over the 25...") |
No edit summary |
||
Line 83: | Line 83: | ||
}} | }} | ||
(assuming that you have installed the packages in the directory <tt>$HOME/perl</tt>). | (assuming that you have installed the packages in the directory <tt>$HOME/perl</tt>). | ||
=== Using the Local::Lib Package to Install Packages === | |||
An alternative approach, based on the Perl package local::lib, is the following - you can simply copy and paste the commands into your terminal for it to work. | |||
{{ | |||
File | |||
|name=perl_library.sh | |||
|lang=bash | |||
|contents= | |||
# install local::lib | |||
wget http://search.cpan.org/CPAN/authors/id/H/HA/HAARG/local-lib-2.000018.tar.gz | |||
tar -xzf local-lib-2.000018.tar.gz | |||
cd local-lib-2.000018 | |||
perl Makefile.PL --bootstrap | |||
make test && make install | |||
# setting up appropriate environment variables so that perl knows about our new ~/perl5/lib directory | |||
cd ~ | |||
echo 'eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"' >> ~/.bashrc | |||
source ~/.bashrc | |||
# check that local::lib is indeed installing to the right directory, you should see a bunch of paths beginning with ~/perl5/lib/perl5/ get printed out | |||
perl -e 'print "@INC"' | |||
}} |