Using Cpan Without Root (Perl)
From Facebook Developer Wiki
(Redirected from Perlstart cpan)
[edit] Using CPAN with Non-Root Access
First, run CPAN to set it up initially...
perl -MCPAN -eshell
And then in your CPAN MyConfig.pm file (~/.cpan/CPAN/MyConfig.pm) add this line after 'make_install_arg'.
'makepl_arg' => q[PREFIX=~/ SITELIBEXP=~/lib/perl5 LIB=~/lib/perl5 INSTALLMAN1DIR=~/share/man/man1 INSTALLMAN3DIR=~/share/man/man3 INSTALLSITEMAN1DIR=~/share/man/man1 INSTALLSITEMAN3DIR=~/share/man/man3],
Then in the console do:
export PERL5LIB="$HOME/lib/perl5"
or for if that doesn't work try (csh):
setenv PERL5LIB "$HOME/lib/perl5"
You might want to add this line to your ~/.profile or other startup file so that this is set for other sessions.
Then to actually install the module:
perl -MCPAN -eshell install WWW::Facebook::API
In your scripts you may need to add the following line (above any use WWW::Facebook::API line)
use lib qw(/home/user/lib/perl5);
And all should be good!
