As has been requested for quite a while, this patch _finally_ makes <Perl> sections strict by default.
Index: todo/release =================================================================== RCS file: /home/cvs/modperl-2.0/todo/release,v retrieving revision 1.29 diff -u -I$Id -r1.29 release --- todo/release 9 Jun 2004 14:46:22 -0000 1.29 +++ todo/release 28 Jun 2004 20:42:57 -0000 @@ -74,10 +74,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] Index: Changes =================================================================== RCS file: /home/cvs/modperl-2.0/Changes,v retrieving revision 1.392 diff -u -I$Id -r1.392 Changes --- Changes 27 Jun 2004 21:26:45 -0000 1.392 +++ Changes 28 Jun 2004 20:42:58 -0000 @@ -12,6 +12,9 @@
=item 1.99_15-dev
+<Perl> sections are now strict by default and can be disabled by +setting $Apache::Server::StrictPerlSections = 0; [Gozer] + Registry: remove the misleading prefix "$$: $class:" in the logged error message, since not only registry errors will get logged if $@ is set [Stas] 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 28 Jun 2004 20:42:58 -0000 @@ -541,16 +541,16 @@
if (SvTRUE(ERRSV)) {
SV *strict = MP_STRICT_PERLSECTIONS_SV;
- if (strict && SvTRUE(strict)) {
- char *error = SvPVX(ERRSV);
- MP_PERL_RESTORE_CONTEXT;
- return error;
- }
- else {
+ if (strict && !SvTRUE(strict)) {
modperl_log_warn(s, apr_psprintf(p, "Syntax error at %s:%d %s",
directive->filename,
directive->line_num,
SvPVX(ERRSV)));
+ }
+ else {
+ char *error = SvPVX(ERRSV);
+ MP_PERL_RESTORE_CONTEXT;
+ return error;
}
}
-- -------------------------------------------------------------------------------- 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
signature.asc
Description: OpenPGP digital signature
