in reply to Appending rather than prepending in "use lib"
A little update on this question, as I've found another solution since implementing the suggested one. Just in case it happens to help anybody coming along later who needs a similar thing.
I discovered at http://perldoc.perl.org/lib.html, the interesting snippet:
For each directory in LIST (called $dir here) the lib module also checks to see if a directory called $dir/$archname/auto exists. If so the $dir/$archname directory is assumed to be a corresponding architecture specific directory and is added to @INC in front of $dir. lib.pm also checks if directories called $dir/$version and $dir/$version/$archname exist and adds these directories to @INC.
So... It's possible to have a number of subdirectories under an included directory, each with the relevant architecture name and the architecture-dependent files under them.
The correct architecture name is found by issuing: perl -V:archname
So for example, under my modules directory, I now have i386-linux-thread-multi and x86_64-linux-thread-multi containing the 32-bit and 64-bit modules respectively.
|
|---|