Thursday, October 1, 2009

local::lib

I used local::lib this week. Wow, it really is a nice way to install cpan modules into my source control tree, to build an app-specific perl5 lib.

3 comments:

Andrew Grangaard said...

local::lib, why have you forsaken me?

Where is Sub/Name.so hiding? I see Sub/Name.bs ...

This is not the time for me to be poking with this...

----

perl -MSub::Name -e 1;
Can't locate loadable object for module Sub::Name in @INC (@INC contains: /home/prodicon/perl5/lib/perl5/x86_64-linux-thread-multi /home/prodicon/perl5/lib/perl5 /home/prodicon/perl5/lib/perl5/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.7/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.6/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at -e line 0
Compilation failed in require.
BEGIN failed--compilation aborted.

Andrew Grangaard said...

Update: FIXED!

local::lib, sorry to have made you take a timeout, but you should pick your friends better.

subversion, you're the troublemaker here. svn add and svn stat were using a default global ignore that includes a *.so glob, this not picking up the .so files and adding them to the repo.

I rebuilt the binaries (reinstalled the modules) via:
eval `perl -Mlocal::lib=/home/prodicon/perl5`
cpan -f install Sub::Name

cpan -r should have worked, not quite sure what was wrong there, but it through this error:

Undefined subroutine &main::_recompile called at /usr/bin/cpan line 278.

Andrew Grangaard said...

the --no-ignore flag to subversion will skip the global ignore list.

svn add perl5 --no-ignore
svn stat thisdir --no-ignore