Hi,
  I am running mod_perl/2.0.4 on Linux , I keep getting the subroutine
redefined warnings. Perlrun reloads the cgi on each request so why do
I keep getting these warnings ? Is there any other way to avoid this
other than no warnings qw/redefine/ in my scripts. Am I missing
something here ?.

  Here is a minimal script I tested with

#!/usr/bin/perl
use strict;
use warnings;
print "Content-type:text/html \n\n";

test();
test();


sub test {
 print " in test \n";
}

  and here is my httpd.conf

         PerlModule ModPerl::PerlRun
      <Location /cgi-bin>
          SetHandler perl-script
          PerlHandler ModPerl::PerlRun
          PerlSetVar ReloadAll Off

          PerlResponseHandler +ModPerl::PerlRun
          PerlOptions +ParseHeaders
          PerlSendHeader On
          Options +ExecCGI
      </Location>
      PerlRequire "/opt/nms/www/cgi-bin/startup.pl"
      # I modify @INC in startup.pl and do not load any modules

Error in the error_log
Subroutine test redefined at /opt/nms/www/cgi-bin/test1.pl line 22.
Subroutine test redefined at /opt/nms/www/cgi-bin/test1.pl line 10.

Thanks,
Kiran

Reply via email to