in reply to Re: Where to install my own perl modules?
in thread Where to install my own perl modules?

I would suggest setting the environment variable PERL5LIB externally to running perl scripts, rather than hacking every script to add a use lib. This is considerably less maintenance if you decide to change your directory structure - like upgrading a version.
The burden you now have is to keep track of what you put there in the event you upgrade Perl and have to re-install your modules.
There's even a way round this. If you install to a common directory, you can share modules between perl versions:
perl Makefile.PL LIB=$MYSHARE/lib PREFIX=$MYSHARE make make test make install
Note that $MYSHARE is a shell environment variable pointing to a path to which you as installer have write access. This even means that you can set up modules without needing root or sysadmin rights.

To use said directory, set PERL5LIB to include $MYSHARE in the path. It also makes installation possible to other nodes without invoking perl (just tar up the directory and distribute it).

I tend to specify both LIB and PREFIX because for the following reasons: LIB is specified so that all .pm and XS code can be found. PREFIX is specified to provide placeholders for manpages and any other collateral that does not end up in the LIB. Note: you might get problems between perl versions if you have incompatible XS binaries.

--
I'm Not Just Another Perl Hacker