failure using Socket in PerlSection

Mark Heiges <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
I have a name-based virtual host and want to use Socket.pm in a PerlSection:

<Perl>
use Socket;
</Perl>

but when starting httpd I get the error,

$parms->add_config() has failed: Invalid command 'INADDR_ANY', perhaps misspelled or defined by a module not included in the server configuration at /usr/lib64/perl5/Apache2/PerlSections.pm line 215.\n

If I print the $self->directives array from PerlSections.pm to STDOUT I see exported variables from Socket mixed in with the normal directives:

INADDR_ANY 
SO_PROTOCOL 38
IP_TTL 2
ErrorDocument 401 /401.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml
ErrorDocument 503 /500.shtml
ProxyPassReverse ...

Which explains the httpd error but how do I prevent these variables working their way into the httpd configuration?

I have this problem with CentOS 6, httpd-2.2.15, mod_perl-2.0.4, perl-5.10.1

I have no trouble using Socket with CentOS 5, httpd-2.2.3, mod_perl-2.0.4, perl-5.8.8
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.