[Purdue-pm] Module Question
Mark Senn
mark at ecn.purdue.edu
Wed Jul 20 09:58:03 PDT 2011
> 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?
Hi Dave,
I'm not sure I understand the problem. The following has not been tested.
How about using the Perl
BEGIN { ... }
so the code inside { and } would be run as soon as it has been read
by the parser but before the rest of the code compiles?
Or maybe,
foreach (@possible_directory)
{
if (-e "$_/$filename")
{
do "$_/$filename";
last;
}
}
Please summarize to the list once you've fourd the best solution.
-mark
More information about the Purdue-pm
mailing list