perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From go...@apache.org
Subject cvs commit: modperl-2.0/src/modules/perl modperl_cmd.c
Date Wed, 26 Feb 2003 09:32:54 GMT
gozer       2003/02/26 01:32:54

  Modified:    .        Changes STATUS
               src/modules/perl modperl_cmd.c
  Log:
  $Apache::Server::StrictPerlSections added. When set to a true
  value, will abort server startup if there are syntax errors
  in <Perl > sections
  
  Reviewed by: stas
  
  Revision  Changes    Path
  1.134     +4 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.133
  retrieving revision 1.134
  diff -u -r1.133 -r1.134
  --- Changes	24 Feb 2003 03:52:22 -0000	1.133
  +++ Changes	26 Feb 2003 09:32:53 -0000	1.134
  @@ -10,6 +10,10 @@
   
   =item 1.99_09-dev
   
  +$Apache::Server::StrictPerlSections added. When set to a true
  +value, will abort server startup if there are syntax errors
  +in <Perl > sections [Philippe M. Chiasson <gozer@cpan.org]
  +
   Use Win32::GetShortPathName for Win32 to handle cases when
   the supplied MP_AP_PREFIX contains spaces. [Randy Kobes]
   
  
  
  
  1.35      +1 -2      modperl-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/STATUS,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- STATUS	20 Feb 2003 00:41:51 -0000	1.34
  +++ STATUS	26 Feb 2003 09:32:53 -0000	1.35
  @@ -154,7 +154,6 @@
   * Apache::PerlSections missing features for backwards compatibility:
    - $Apache::Server::SaveConfig
    - $Apache::ReadConfig::DocumentRoot
  - - $Apache::Server::StrictPerlSections
    - Apache::PerlSections->store(filename)
   
     Report: Philippe M. Chiasson <gozer@cpan.org>
  
  
  
  1.38      +13 -1     modperl-2.0/src/modules/perl/modperl_cmd.c
  
  Index: modperl_cmd.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- modperl_cmd.c	21 Dec 2002 03:46:07 -0000	1.37
  +++ modperl_cmd.c	26 Feb 2003 09:32:54 -0000	1.38
  @@ -316,6 +316,8 @@
   
   #define MP_DEFAULT_PERLSECTION_HANDLER "Apache::PerlSection"
   #define MP_DEFAULT_PERLSECTION_PACKAGE "Apache::ReadConfig"
  +#define MP_STRICT_PERLSECTIONS_SV \
  +get_sv("Apache::Server::StrictPerlSections", FALSE)
   
   MP_CMD_SRV_DECLARE(perldo)
   {
  @@ -369,7 +371,17 @@
       eval_pv(arg, FALSE);
   
       if (SvTRUE(ERRSV)) {
  -        return SvPVX(ERRSV);
  +        SV *strict;
  +        if ((strict = MP_STRICT_PERLSECTIONS_SV) && SvTRUE(strict)) {
  +            return SvPVX(ERRSV);
  +        }
  +        else {
  +            modperl_log_warn(s, apr_psprintf(p, "Syntax error at %s:%d %s", 
  +                                             parms->directive->filename, 
  +                                             parms->directive->line_num, 
  +                                             SvPVX(ERRSV)));
  +
  +        }
       }
       
       if (handler) {
  
  
  

Mime
View raw message