Dirk Bremer wrote:
I have all of the modules that I have created either in the same single
directory that contains the scripts or in sub-directories of the script
directory. I use this in every script:
use FindBin qw($Bin);
use lib $Bin;
I never have any problems no matter where the script is executed from.
Hope this helps.
Thank you, that will work! You have just given me reason to get rid of
my ugly code.
The only slight tweak I have is that my start script is one level down
from the root dir. But that's easy enough to handle. Looks like
FindBin does the heavy lifting.
My folders are arranged thusly:
somerootpath/
client/
common/
server/
The starting script is either in 'client' (for the client software) or
'server' (for the server software). They would need to include
scripts/modules in their own directory, or possibly subdirectories, plus
the ones in 'common'.
So, I guess I could write, in the server code:
use FindBin qw($ServerDir);
use lib $ServerDir;
use lib "$ServerDir/../common";
--
Lyle Kopnicky
Software Project Engineer
Veicon Technology, Inc.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs