perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [patch] removing redundant perlmodule/perlrequire calls
Date Wed, 16 Jan 2002 17:08:38 GMT
>>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>


probably need to add a new test.


> i think the following would be ok though.


+1, good catch!

 
> 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)) {
> 



-- 


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


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


Mime
View raw message