perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject [book review] PerlTaintMode and PERL5LIB/PERL5OPT env vars.
Date Sun, 19 Nov 2000 16:09:47 GMT
I've lost the original email, but this is reply from Doug to my
email. I've asked to confirm that PERL5LIB is ignored with PerlTaintMode
is on.

> Hmm, I didn't take it out of my head, I cannot remember now when it was
> added. Was it different before and I've missed the patch?

according to changes, it's been there 1.00_02.
> Anyway, that means that I should fix the guide, to remove the note about
> PERL5LIB and PerlTaintMode, right? these two has nothing to do with each


But according to perlrun manpage (dist 5.00503):

       PERL5LIB    A colon-separated list of directories in which
                   to look for Perl library files before looking
                   in the standard library and the current
                   directory.  If PERL5LIB is not defined,
                   PERLLIB is used.  When running taint checks
                   (because the script was running setuid or
                   setgid, or the -T switch was used), neither
                   variable is used.  The script should instead

                       use lib "/my/directory";

       PERL5OPT    Command-line options (switches).  Switches in
                   this variable are taken as if they were on
                   every Perl command line.  Only the -[DIMUdmw]
                   switches are allowed.  When running taint
                   checks (because the script was running setuid
                   or setgid, or the -T switch was used), this
                   variable is ignored.  If PERL5OPT begins with
                   -T, tainting will be enabled, and any
                   subsequent options ignored.

So both vars are ignored according to the Perl docs. How come that
mod_perl doesn't? And I've tested and confirm that they aren't ignored.

We obviously need to kill all inaccuracies in the book, so any insights
are very welcome.

Should we just say: that in contrast with perlrun man page, under mod_perl
PERL5OPT and PERL5LIB enviroment variables aren't ignored. 

Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker       mod_perl Guide

View raw message