moseley has asked for the wisdom of the Perl Monks concerning the following question:

Got a call from a client today. I had installed some modules in a local $HOME/perl_lib library. You know:
perl Makefile.PL PREFIX=$HOME/perl_lib
or LIB=...

Seems their ISP (finally) updated their perl installation which broke something. Namely, the local HTML::LinkExtor no longer extracted links.

So my question is this: I've got quite a few modules installed in my local lib. I don't have the source packages still around. What's an easy way to remove just a few modules from my local lib (so that I'll use the site-wide versions instead)? I can go in and delete the module, but it's not very clean (e.g. when there's a binary part to the module).

I often will just install and use my own version of Perl in ISPs. I tried that, but the install croaks due to the ISPs NFS setup:

$perl -MFindBin opendir(./..): Permission denied at /usr/share/perl/5.6.1/FindBin.pm l +ine 97
Doesn't Brian Ingerson have a new module that can find the newest version of a module in @INC?

Replies are listed 'Best First'.
Re: Managine local modules
by Revelation (Deacon) on May 01, 2003 at 23:27 UTC
    If all you're looking to do is to load the module with the newest version you may want to consider ex::newest. However, if your sole goal is to have your script check all other directories before the local lib directory, there may be an easier way: If you're use()-ing lib;, you may want to consider pushing into @INC, since perl transverses @INC as an array to find module- see perldoc -f require. Or you could also just go by hand, and remove the module from existance, which is a cumbersome possibility.

    Of Note: Ingerson's module, which may be helpful as well, is only .
    Gyan Kapur
    gkapur@myrealbox.com
      Thanks, ex::newest looks like what would be closest. I suppose there's a minor performance hit for looking more through @INC.

      I can't just alter @INC because now my local perl library has modules that are both newer and older than the installed ones.

      I guess I just have this desire to have a nice clean local perl library of just the modules I need -- and once the site-wide library contains a newer version of some module I'd like to purge my local library of the older version.

      Thanks again for the pointer to ex::newest.