Loading ...
Sorry, an error occurred while loading the content.

Re: Bareword "Apache::OK" not allowed while "strict subs" in use

Expand Messages
  • Foo Ji-Haw
    Try: return Apache2::Const::OK; ;)
    Message 1 of 7 , Jun 28, 2005
    • 0 Attachment
      Try:
      return Apache2::Const::OK;

      ;)

      Ronni wrote:

      > I have spent many days now searching through the archives and although
      > they are close to what I am seeing none are exactly like what I have.
      >
      > I am using Apache 2 and installing ModPerl 2 on a Linux Mandrake 10.1
      > box. Apache 2 is a recent install and ModPerl 2 is something I would
      > like to get working soon.
      >
      > I can run perl from cgi-bin but would like to keep the perl stuff in
      > it's own directory. I've set this up numerous times using the ModPerl
      > online documentation as well as all the Apache/ModPerl info I can find.
      >
      > I've added the following to the httpd.conf file:
      >
      > PerlModule Apache2 ##This allows perl
      > -V to look in /Apache2/ under the perl install
      > Alias /perl/ /usr/local/apache2/perl/ ##The directory I would
      > like to keep the perl scripts
      > <Location /perl>
      > SetHandler perl-script
      > PerlResponseHandler ModPerl::Registry
      > PerlOptions +ParseHeaders
      > PerlOptions -GlobalRequest
      > Options +ExecCGI
      > </Location>
      >
      > The log file shows the following at apache startup:
      >
      > [Tue Jun 28 08:42:59 2005] [notice] Apache/2.0.54 (Unix)
      > mod_perl/2.0.1 Perl/v5.8.5 configured -- resuming normal
      > operations
      >
      >
      > So it appears that everything is fine.
      > Then when I use an address like the following:
      >
      > http://localhost/perl/rock.pl
      >
      > with the following in rock.pl
      >
      > #!/usr/bin/perl
      >
      > print "Content-type: text/plain\n\n";
      > print "mod_perl 2.0 rocks!\n";
      >
      > I get an Internal Server Error page with the following in the error_log:
      >
      > [Tue Jun 28 13:00:31 2005] [error] [client 127.0.0.1] failed to
      > resolve handler `ModPerl::Registry': Bareword "Apache::OK"
      > not allowed while "strict subs" in use at
      >
      > /usr/lib/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/Apache2/ModPerl/RegistryCooker.pm
      > line
      > 160.\nBareword "Apache::OK" not allowed while "strict subs" in
      > use at
      >
      > /usr/lib/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/Apache2/ModPerl/RegistryCooker.pm
      > line
      > 162.\nBareword "Apache::OK" not allowed while "strict subs" in
      > use at
      >
      > /usr/lib/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/Apache2/ModPerl/RegistryCooker.pm
      > line
      > 170.\nBEGIN not safe after errors--compilation aborted at
      >
      > /usr/lib/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/Apache2/ModPerl/RegistryCooker.pm
      > line
      > 200.\nCompilation failed in require at (eval 4) line
      > 3.\n\t...propagated at /usr/lib/perl5/5.8.5/base.pm line
      > 85.\nBEGIN failed--compilation aborted at
      >
      > /usr/lib/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/Apache2/ModPerl/Registry.pm
      > line
      > 25.\nCompilation failed in require at (eval 3) line 3.\n
      >
      > Have I lost my mind? I'm new to modperl. Thanks in advance for any
      > help that you would be able to offer! Trust me! It is GREATLY
      > appreciated!
      >
      > Thanks!
      > Ronni
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.