Unless I am seriously mistaken, the consensus was to completely get rid of configurable
strictness for perlsections. Fix it at strict, and suggest using eval {} blocks if 
there
is a need _not_ to abort server-startup in the case of an exception.

Index: Changes
===================================================================
RCS file: /home/cvs/modperl-2.0/Changes,v
retrieving revision 1.409
diff -u -I$Id -r1.409 Changes
--- Changes     12 Jul 2004 23:16:21 -0000      1.409
+++ Changes     13 Jul 2004 00:45:27 -0000
@@ -12,6 +12,10 @@

 =item 1.99_15-dev

+Deprecate $Apache::Server::StrictPerlSections. Now, all <Perl>
+sections are strict by default and cause server startup to
+abort on error. [Gozer]
+
 Fix ($r|$filter|$bucket)->read() functions to run the set magic logic,
 to handle cases when a passed buffer to fill is not a regular
 scalar. [Stas]
Index: docs/api/Apache/PerlSections.pod
===================================================================
RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/PerlSections.pod,v
retrieving revision 1.11
diff -u -I$Id -r1.11 PerlSections.pod
--- docs/api/Apache/PerlSections.pod    22 May 2004 02:03:27 -0000      1.11
+++ docs/api/Apache/PerlSections.pod    13 Jul 2004 00:45:27 -0000
@@ -148,17 +148,6 @@



-=head2 C<$Apache::Server::StrictPerlSections>
-
-By default, compilation and run-time errors within C<E<lt>Perl E<gt>>
-sections will cause a warning to be printed in the error_log. By
-setting this variable to a true value, code in the sections will be
-evaluated as if "use strict" was in usage, and all warning and errors
-will cause the server to abort startup and report the first error.
-
-
-
-
 =head1 PerlSections dumping

 =head2 Apache::PerlSections-E<gt>dump
Index: docs/user/porting/compat.pod
===================================================================
RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/porting/compat.pod,v
retrieving revision 1.55
diff -u -I$Id -r1.55 compat.pod
--- docs/user/porting/compat.pod        7 Jul 2004 21:52:25 -0000       1.55
+++ docs/user/porting/compat.pod        13 Jul 2004 00:45:27 -0000
@@ -84,6 +84,13 @@
       PerlFreshRestart
   </IfDefine>

+=head2 C<$Apache::Server::StrictPerlSections>
+
+In mod_perl 2.0, C<L<E<lt>PerlE<gt>|docs::2.0::api::Apache::PerlSections>>
+sections are now always strict. Any error in them will cause an immediate
+server startup abort, dumping the error to stderr. To avoid this, eval blocks
+can be used to trap errors and ignore them.
+
 =head2 Apache Configuration Customization

 mod_perl 2.0 has slightly changed the mechanism for L<adding custom
Index: src/modules/perl/modperl_cmd.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.c,v
retrieving revision 1.60
diff -u -I$Id -r1.60 modperl_cmd.c
--- src/modules/perl/modperl_cmd.c      16 Jun 2004 03:55:47 -0000      1.60
+++ src/modules/perl/modperl_cmd.c      13 Jul 2004 00:45:27 -0000
@@ -463,8 +463,6 @@

 #define MP_DEFAULT_PERLSECTION_HANDLER "Apache::PerlSections"
 #define MP_DEFAULT_PERLSECTION_PACKAGE "Apache::ReadConfig"
-#define MP_STRICT_PERLSECTIONS_SV \
-    get_sv("Apache::Server::StrictPerlSections", FALSE)
 #define MP_PERLSECTIONS_SAVECONFIG_SV \
     get_sv("Apache::Server::SaveConfig", FALSE)

@@ -540,18 +538,8 @@
     }

     if (SvTRUE(ERRSV)) {
-        SV *strict = MP_STRICT_PERLSECTIONS_SV;
-        if (strict && SvTRUE(strict)) {
-            char *error = SvPVX(ERRSV);
-            MP_PERL_RESTORE_CONTEXT;
-            return error;
-        }
-        else {
-            modperl_log_warn(s, apr_psprintf(p, "Syntax error at %s:%d %s",
-                                             directive->filename,
-                                             directive->line_num,
-                                             SvPVX(ERRSV)));
-        }
+        MP_PERL_RESTORE_CONTEXT;
+        return SvPVX(ERRSV);
     }

     if (handler) {
Index: todo/release
===================================================================
RCS file: /home/cvs/modperl-2.0/todo/release,v
retrieving revision 1.30
diff -u -I$Id -r1.30 release
--- todo/release        5 Jul 2004 22:02:42 -0000       1.30
+++ todo/release        13 Jul 2004 00:45:28 -0000
@@ -69,10 +69,6 @@
   http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=106074969831522&w=2
   owner: gozer

-* $Apache::Server::StrictPerlSections should be 1 by default (and docs
-  updated)
-  owner: gozer
-
 * Fixing Apache->warn("foo")

   Report: http://mathforum.org/epigone/modperl-dev/noxtramcay/[EMAIL PROTECTED]

--
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to