[Groningen-pm] @INC maar dan permanent in een filetje?
Elizabeth Mattijsen
liz at dijkmat.nl
Thu Jun 24 05:07:26 PDT 2010
On Jun 24, 2010, at 1:47 PM, Piet Plomp wrote:
> Hoi allemaal,
>
> Ik kreeg vandaag een vraag waar ik het antwoord niet op weet.
> Kan het ook nergens vinden.
>
> Probleem: als je zelf modules installeert of bouwt, plaats je die in een
> directory ~/lib/perl of zo.
> In je script zet je dan: use lib /je/home/dir/lib/perl;
> Of je past @INC aan.
> Of je gebruikt -I.
>
> Maar hoe maak je dat default in bv een filetje?
> Of met een environment variable die je bij het inloggen zet?
>
> Anyone?
>
> Bedankt en groetjes,
uit perldoc perlrun:
PERL5LIB A list of directories in which to look for Perl library
files before looking in the standard library and the cur-
rent directory. Any architecture-specific directories
under the specified locations are automatically included if
they exist. If PERL5LIB is not defined, PERLLIB is used.
Directories are separated (like in PATH) by a colon on
unixish platforms and by a semicolon on Windows (the proper
path separator being given by the command "perl
-V:path_sep").
When running taint checks (either because the program was
running setuid or setgid, or the -T switch was used), nei-
ther variable is used. The program should instead say:
use lib "/my/directory";
dus:
$ PERL5LIB=~/je/home/dir/lib/perl jouwscript.pl parameters
of exporteer PERL5LIB van te voren...
Liz
More information about the Groningen-pm
mailing list