perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: [patch] removing redundant perlmodule/perlrequire calls
Date Wed, 16 Jan 2002 17:06:39 GMT
On Wed, 16 Jan 2002, Stas Bekman wrote:

> I think we don't need these calls, they are already called from 
> modperl_startup() for vhosts that need their own parent perl interpreter.

that would mean Perl{Require,Module} would not be applied in a vhost that
shares the parent interpreter.  for example, this would be ignored:

<VirtualHost foo>
   PerlRequire foo.pl
</VirtualHost>

i think the following would be ok though.

Index: src/modules/perl/mod_perl.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
retrieving revision 1.104
diff -u -r1.104 mod_perl.c
--- src/modules/perl/mod_perl.c	9 Jan 2002 00:31:39 -0000	1.104
+++ src/modules/perl/mod_perl.c	16 Jan 2002 16:59:42 -0000
@@ -264,14 +264,15 @@
                        "created parent interpreter for VirtualHost %s\n",
                        modperl_server_desc(s, p));
         }
-
-        if (!modperl_config_apply_PerlModule(s, scfg, perl, p)) {
-            exit(1);
-        }
-        if (!modperl_config_apply_PerlRequire(s, scfg, perl, p)) {
-            exit(1);
+        else {
+            if (!modperl_config_apply_PerlModule(s, scfg, perl, p)) {
+                exit(1);
+            }
+            if (!modperl_config_apply_PerlRequire(s, scfg, perl, p)) {
+                exit(1);
+            }
         }
-        
+
 #ifdef USE_ITHREADS
 
         if (!MpSrvENABLE(scfg)) {


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message