Perl: Difference between revisions

Jump to navigation Jump to search
917 bytes removed ,  6 years ago
no edit summary
No edit summary
No edit summary
Line 96: Line 96:
<nowiki>
<nowiki>
</nowiki>
</nowiki>
}}
=== Using the Local::Lib Package to Install Packages === <!--T:11-->
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
<!--T:12-->
# 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
<!--T:13-->
# 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"'
}}
}}
</translate>
</translate>
Bureaucrats, cc_docs_admin, cc_staff
2,314

edits

Navigation menu