Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to disable perl warnings in apache?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1341

PostPosted: Mon Mar 07, 2016 8:30 pm    Post subject: how to disable perl warnings in apache? Reply with quote

Greetings all.

I have two very similar Gentoo setups running apache and I am testing a web application that uses perl via mod_cgi.
I am unable to turn off Perl warnings printed to the browser on one of the setups, the other seems identical and is fine.
I actually 'diffed' the entire apache config directory on both and they are quite similar. Nothing fancy.


Both setups have a similar configuration file that calls the perl like so:
Code:

 <Directory /var/www/localhost/htdocs/testing/>
   AllowOverride All
   AddHandler cgi-script .pl
   Options ExecCGI Includes FollowSymlinks
   Require all granted
</Directory>


Setup A is fine running apache 2.4.18 and is 64 bit.
Setup B is having the problem running 2.4.18-r1 is 32 bit.
They both have the same USE flags other than "-proxy_html" on setup B
If I do a
Code:
grep -r 'proxy_html' /etc/portage/

I don't get a match so it just be a Gentoo setting?

Both systems are on a recent Perl:
Code:

perl -v

This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-thread-multi
(with 30 registered patches, see perl -V for more detail)


On Setup B I am unable to turn "off" Perl warnings, even if I add
Code:
no warnings;

to the file that invokes Perl!

Looking here but don't see anything:
http://httpd.apache.org/docs/current/mod/mod_cgi.html


Any thoughts?
Thank you in advance
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13509

PostPosted: Tue Mar 08, 2016 2:44 am    Post subject: Reply with quote

Why not fix the warnings? Generally, Perl warnings are not spurious, so fixing them might lead to better code.
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1341

PostPosted: Tue Mar 08, 2016 6:11 am    Post subject: Reply with quote

Hu wrote:
Why not fix the warnings? Generally, Perl warnings are not spurious, so fixing them might lead to better code.

Of course I will and I do. However I can only work so many hours in a day and I need to switch the 'B' system over to production use for a while. And i should be able to turn warnings off according to perldoc.

I do however consider "Use of uninitialized value in new" a spurious warning,
when it is just the application feeding the 'empty string' or a zero to a function.
Is it not odd that
Code:
no warnings;
$^W = 0;
does not turn warnings off?
--cheers
Turtle
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum