2

I am trying to run a Perl CGI web application under mod_perl 2.0 using PerlRun. After making a few simply changes to the scripts everything seems to work.

However, the Apache error_log is getting huge! Fast.

There are many, many errors per request but they are of two types:

1)

Constant subroutine ModPerl::ROOT::ModPerl::PerlRun::var_www_html_myapp_main_2epl::RC_SERVICE_UNAVAILABLE redefined at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/ModPerl/Util.pm line 69.

2)

Prototype mismatch: sub ModPerl::ROOT::ModPerl::PerlRun::var_www_html_myapp_main_2epl::RC_SWITCHING_PROTOCOLS: none vs () at /var/www/html/myapp/main.pl line 1054

This is line 1054 of main.pl:

use LWP::Simple qw(!head);

How can I get rid of these two types of errors?

1

1 Answer 1

3

Both of your error messages are related to LWP::Simple. LWP::Simple exports the HTTP constants, this causes the redefined warnings. When you use LWP::Simple try to include only the functions that you need use LWP::Simple qw(get, getstore); You may still see the prototype mismatch errors on those functions.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.