in reply to How can you make 'use lib "foo"; dynamic?
If you set the PERL5LIB environment variable to the location of personal modules, it will be added to the head of @INC. For web services, environment variables can be set in the server configuration files. The gotcha is that taint mode will ignore PERL5LIB, just like any other environment variable.
You'll need to make sure your configuration is read at compile time so that the location variable is already set in time to use.
I've posited the simplest kind of perl configuration file here; modify to taste.use vars qw/$config/; BEGIN { $config = do '/path/to/config.file'; } use lib $config->{'lib'};
After Compline,
Zaxo
|
|---|