perl-homedir / per user local::lib invocation

Chris Weyl cweyl at alumni.drew.edu
Tue Jan 5 02:29:55 UTC 2010


Sooo....  Over on the modernperlbooks blog, chromatic recently wrote a
couple good posts[1] about regular users using cpan, and integrating
CPAN.pm with distro-specific bits (e.g. interface with yum, etc).

This isn't an implementation of any of that :)  But using local::lib
to manage CPAN installs at the per-user level is near-trivial; it's
what it was designed for, after all.  And inserting a script in
/etc/profile.d to do that would make it "just work" for everyone on a
given system.  Hence, a new subpackage off perl-local-lib:
perl-homedir (just built in rawhide).  It just installs
/etc/profile.d/perl-homedir.{sh,csh}; which in turn invokes "eval
`perl -Mlocal::lib`".

Most users wouldn't ever see this -- the package would have to be
explicitly installed.  And even then, the average user isn't going to
be using the cpan tool.  I use something like this in my ~/.bashrc
already, and it's pretty nice to be able to quickly install a bunch of
new modules from the CPAN w/o either clobbering system-wide SITELIB
dirs or packaging a half dozen additional modules.  (Like the other
day, when I decided to see what all the fuss about Plack/PSGI is
about.)

Thoughts?
                                      -Chris

[1] http://www.modernperlbooks.com/mt/2009/12/helping-perl-packagers-package-perl.html,
http://www.modernperlbooks.com/mt/2009/12/more-perl-packaging-possibilities.html

-- 
Chris Weyl
Ex astris, scientia




More information about the Fedora-perl-devel-list mailing list