gozer 2004/07/12 20:59:46
Modified: . Changes
src/docs/2.0/api/Apache PerlSections.pod
src/docs/2.0/user/porting compat.pod
src/modules/perl modperl_cmd.c
todo release
Log:
Remove $Apache::Server::StrictPerlSections. Now, all <Perl>
sections errors are fatal by default and cause server startup to
abort on error.
Reviewed by: stas
Revision Changes Path
1.410 +4 -0 modperl-2.0/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl-2.0/Changes,v
retrieving revision 1.409
retrieving revision 1.410
diff -u -r1.409 -r1.410
--- Changes 12 Jul 2004 23:16:21 -0000 1.409
+++ Changes 13 Jul 2004 03:59:46 -0000 1.410
@@ -12,6 +12,10 @@
=item 1.99_15-dev
+Remove $Apache::Server::StrictPerlSections. Now, all <Perl>
+sections errors are fatal 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]
1.12 +0 -11 modperl-docs/src/docs/2.0/api/Apache/PerlSections.pod
Index: PerlSections.pod
===================================================================
RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/PerlSections.pod,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- PerlSections.pod 22 May 2004 02:03:27 -0000 1.11
+++ PerlSections.pod 13 Jul 2004 03:59:46 -0000 1.12
@@ -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
1.56 +8 -0 modperl-docs/src/docs/2.0/user/porting/compat.pod
Index: compat.pod
===================================================================
RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/porting/compat.pod,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- compat.pod 7 Jul 2004 21:52:25 -0000 1.55
+++ compat.pod 13 Jul 2004 03:59:46 -0000 1.56
@@ -84,6 +84,14 @@
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 errors are now always fatal. Any error in them will cause an immediate
+server startup abort, dumping the error to stderr. To avoid this, C<eval {}>
+can be used to trap errors and ignore them. In mod_perl 1, 'strict' was
+somewhat of a misnomer.
+
=head2 Apache Configuration Customization
mod_perl 2.0 has slightly changed the mechanism for L<adding custom
1.61 +2 -14 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.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- modperl_cmd.c 16 Jun 2004 03:55:47 -0000 1.60
+++ modperl_cmd.c 13 Jul 2004 03:59:46 -0000 1.61
@@ -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) {
1.31 +0 -4 modperl-2.0/todo/release
Index: release
===================================================================
RCS file: /home/cvs/modperl-2.0/todo/release,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- release 5 Jul 2004 22:02:42 -0000 1.30
+++ release 13 Jul 2004 03:59:46 -0000 1.31
@@ -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]