[Purdue-pm] Module Question

Doug Yatcilla yatcilla at purdue.edu
Wed Jul 20 10:54:07 PDT 2011

On Wed Jul 20 12:02:45 2011, Dave Jacoby <jacoby at purdue.edu> wrote:
> I have modules that run on our servers, separated by purpose. So,  
> Dave::First calls Dave::Second in order to get, for example, the SQL  
> interfaces.
> And this also gets used on RCAC clusters, and I certainly don't want to  
> have too much parallel development. Which is where 'use lib' starts to 
> hurt.
> On our servers, it's
> 	use lib '/home/jacoby/lib' ;
> 	use Dave::First ':all' ;
> On RCAC servers, it's something way different. I can't do anything with  
> Cwd, because that's not going to be ready until after the load library  
> stuff happens, which is where I need it. Any suggestions?

If there are only two systems and you keep your perl libraries in
different directories on each system, you could put two "use lib"
lines in your code listing both directories.

Or, you could set the PERL5LIB shell environment variable to be the
directory with your perl libraries.  If you use this, you won't need
the "use lib" line in your code.  You login scripts could
automatically set the PERL5LIB env var to the appropriate directory
for the server or you could set it to all possible directories so the
same PERL5LIB will work on any server you use.


More information about the Purdue-pm mailing list