Stas Bekman wrote:

Kemin Zhou wrote:

My my Apache perl installation, the lib search path is different from the system wide path

I am using Linux

My Apache Perl (either under mod_perl or cgi) produced the following results
This is the content of @INC


/usr/lib/perl5/5.8.4/i686-linux-thread-multi-ld
/usr/lib/perl5/5.8.4
/usr/lib/perl5/site_perl/5.8.4/i686-linux-thread-multi-ld
/usr/lib/perl5/site_perl/5.8.4
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/local/apache2/
/usr/local/apache2/lib/perl

=======
In my /etc/profile   I added my testing directory and .
These two are not here; furthermore
/usr/local/apache2/
/usr/local/apache2/lib/perl

are not in my system perl @INC

There are must be some way to set the Apache Perl @INC to include the current directory, some where other than using the
push @INC, "."; inside my script.


Does anyone know how?


"." is automatically removed when that taint mode (-T) is on. Refer to the perlsec Perl manpage for more info. This has nothing to do with mod_perl.

> /usr/local/apache2/
> /usr/local/apache2/lib/perl

are added when running mod_perl 2, for mp1 compatibility.
http://perl.apache.org/docs/2.0/user/install/install.html#MP_COMPAT_1X
disable it to avoid this from happening.

Thaks Stas for the pointer. I can go around this limitation for Taint checking (which is a must for server side programing). Now the Apache/perl
(not just mod_perl but cgi too) user can either put their module into some standard place or do "use lib /absolute/path/tomodule/.
In mod_perl we don't manually call our programs at the command line, that gave you a chance to change the
lib-path with -I/some/path. Even this is possible it is not onece for all solution. Under mod_perl, in most cases, we have to convert our regular perl programs into modules to avoid
the problem of wrapping our program inside sub handler { # the whole perl programs with more than one sub { } }


Here the programmer's convinence is gone. Is there a way to put modules in the /perl directory by configure the
apache httpd.conf file? (This is just a wish)


What is the common practice if Taint check is turned on for perl?

Kemin




********************************************************************** Proprietary or confidential information belonging to Ferring Holding SA or to one of its affiliated companies may be contained in the message. If you are not the addressee indicated in this message (or responsible for the delivery of the message to such person), please do not copy or deliver this message to anyone. In such case, please destroy this message and notify the sender by reply e-mail. Please advise the sender immediately if you or your employer do not consent to e-mail for messages of this kind. Opinions, conclusions and other information in this message represent the opinion of the sender and do not necessarily represent or reflect the views and opinions of Ferring. **********************************************************************


-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to