Re: Compiling with RegistryLoader

2001-08-09 Thread Perrin Harkins

> I try to precompile a perl script on SERVER start-up using the typical
> configuration. But I start the server a get a lot of errors or warnings
that
> refer to standard Perl modules.

It looks like you're having problem stemming from mod_perl executing the
PerlRequire command twice during startup.  Try upgrading to mod_perl 1.26,
which fixes this bug.
- Perrin




Compiling with RegistryLoader

2001-08-09 Thread Kostas Lykourgiotis

Hi all,
I try to precompile a perl script on SERVER start-up using the typical
configuration. But I start the server a get a lot of errors or warnings that
refer to standard Perl modules.
On the other hand, if I try to compile the same script on a CHILD process
start-up, using a very similar configuration everything works fine!
The same situation occurred with every other script that I tried to compile.
These scripts are huge and they use MANY Perl modules.

The problem seems to be that there is a difference between the way that a script
is compiled in
parent apache process and in a apache child.

Has anybody faced the same problem, or knows any info that will help to overcome
it ?


Configuration:
Apache 1.3.20 on Linux
Perl 5.6.1 with itheads
mod_perl 1.25

-
The configuration of the first case is described hereafter:
 conf/httpd.conf 
PerlRequire conf/startup.pl
 conf/startup.pl 
use Apache::RegistryLoader;
my $rl = Apache::RegistryLoader->new();
$rl->handler('/Service/top/ig/huge.pl', '/home/dir/www/cgi-bin/huge.pl') ;


When I start the server, messages like this flood the error_log file:

Prototype mismatch: sub Socket::INADDR_ANY vs () at
/opt/irc/ircv2.5/lib/perl5/5.6.1/i686-linux/Socket.pm line 329,  line 378.
Prototype mismatch: sub Socket::INADDR_BROADCAST vs () at
/opt/irc/ircv2.5/lib/perl5/5.6.1/i686-linux/Socket.pm line 330,  line 378.
.
.
Subroutine TIEHASH redefined at
/opt/irc/ircv2.5/lib/perl5/5.6.1/i686-linux/DB_File.pm line 32,  line 378.
Subroutine FETCH redefined at
/opt/irc/ircv2.5/lib/perl5/5.6.1/i686-linux/DB_File.pm line 44,  line 378.
.
.
When I try to GET http://my.host/Service/top/ig/huge.pl I get more error
messages.

---
The configuration of the second case (compile on the child startup) :
 conf/httpd.conf 
PerlChildInitHandlerconf::startup
 conf/startup.pm 
package conf::startup
use Apache::RegistryLoader;
sub handler {
  my $rl = Apache::RegistryLoader->new();
  $rl->handler('/Service/top/ig/huge.pl', '/home/dir/www/cgi-bin/huge.pl') ;
}

After start-up the script is executed with the Apache::Registry and everything
works fine!



Thanks in advance,
 Kostas

begin:vcard 
n:Lykourgiotis;Konstantinos
x-mozilla-html:FALSE
adr:;;
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;0
fn:Konstantinos Lykourgiotis
end:vcard