|
|
|
|
|
|
| Author |
Message |
Big and Blue *nix forums addict
Joined: 21 Feb 2005
Posts: 95
|
Posted: Mon Feb 21, 2005 10:12 pm Post subject:
Re: modulespath via environment-variable ?
|
|
|
Felix Drueke wrote:
| Quote: |
is it possible to specify an alternative modules-path via environment-
variable?
|
Yes, but there are other ways to do it too, and better ones.
| Quote: | we are developing a product that uses perl and some perlmodules.
We want that the modules are installed in the developers workspace
from the source-control-system and not host-wide in /usr/local/lib/perl5.
We want that the perlmodules are part of the product.
|
Then make them part of the product. Get the product to add:
use lib qw( dir-path1 dir-path2 etc );
at the beginning of each script.
| Quote: | As we already have many perl-scripts I just want to be able to set
an environment-variable (in a "PERLHOME"-style) in order to tell all
of them that they should search in that path for modules.
|
However, if you do that in a global environment variable (PERL5LIB)
then *all* perl usage will start looking in those locations, which isn't
what you want.
You could also write a script interlude which execs the "real" perl,
having inserted relevant -Idir... options at the start of the argument
list. Then get the scripts to use this interlude in the #! line.
| Quote: | Thanks for any hints,
|
Application settings go with an application, not the global system.
--
Just because I've written it doesn't mean that
either you or I have to believe it. |
|
| Back to top |
|
 |
Brian McCauley *nix forums Guru Wannabe
Joined: 21 Feb 2005
Posts: 277
|
Posted: Mon Feb 21, 2005 1:09 pm Post subject:
Re: modulespath via environment-variable ?
|
|
|
Felix Drueke wrote:
| Quote: | is it possible to specify an alternative modules-path via environment-
variable?
|
Yes.
| Quote: | Thanks for any hints,
|
The a list of environment variables that can effect Perl can be found in
the reference manual. Actually they are not quite all in one place but
searching for the string "ENVIRONMENT" in the table of contents will
find them quickly. |
|
| Back to top |
|
 |
Felix Drueke *nix forums beginner
Joined: 21 Feb 2005
Posts: 1
|
Posted: Mon Feb 21, 2005 8:19 am Post subject:
modulespath via environment-variable ?
|
|
|
Hi,
is it possible to specify an alternative modules-path via environment-
variable?
The reason I ask is:
we are developing a product that uses perl and some perlmodules.
We want that the modules are installed in the developers workspace
from the source-control-system and not host-wide in /usr/local/lib/perl5.
We want that the perlmodules are part of the product.
As we already have many perl-scripts I just want to be able to set
an environment-variable (in a "PERLHOME"-style) in order to tell all
of them that they should search in that path for modules.
Thanks for any hints,
Felix |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Wed Jan 07, 2009 8:27 pm | All times are GMT
|
|
Novela romantica | Looking for Credit Cards? | Loan | Western Union Money Order | Online Advertising
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|