On Thu, 2009-02-26 at 15:49 -0500, Adam Prime wrote: > André Warnier wrote: > > Matthew Lenz wrote: > >> I can't seem to disable warnings on our production environment. 'use > >> warnings' is not included in any of the config/startup/scripts or custom > >> modules. Its possible I guess that its being used by a CPAN module. > >> > >> We had a system on Debian 3.1 (apache/mod_perl 1.x)and I have been doing > >> work to migrate the app to Debian 5.0 (apache/mod_perl 2). > >> > >> I don't mine the extra log data in development and intend to fix these > >> issues but I can't have these '-e: Use of uninitialized value' cramming > >> up my production log files. > >> > >> I've tried everything I can think of, anyone have any ideas? > >> > > > > If you are talking about cgi-bin scripts, then they probably all start > > with a line like > > #!/usr/bin/perl -w > > > > Removing the -w would do it. > > But the warnings themselves mean something that you'd better not ignore. > > > > To remove the -w, you could even use a perl one-liner, such as > > > > perl -pi'.bak' -e 's/^#!\/usr\/bin\/perl -w/#!\/usr\/bin\/perl/' *.pl > > > > .. but try this first on a limited set somewhere !!! > > > > Another thing to check is if you've got > > PerlSwitches -w > > in your httpd.conf, that'll turn on warnings too. > > Adam
I have no 'use warnings' anywhere in my code/config. I have no shebangs with -w/W anywhere. I did however, JUST figure it out: PerlSwitches -X That's the only thing that would work and honestly its highly undesirable. The crazy thing is that ModPerl::RegistryCooker seems to expend a lot of time making damn well sure that it respects the scripts warnings settings. Maybe the debian guys did something goofy with the modules. It wouldn't be the first time. That or maybe its just a bug in ModPerl. Even if some CPAN module out there has 'use warnings;' in it that shouldn't have any affect on any code outside of its own package should it?