Philippe M. Chiasson wrote:
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]

I think we need to choose a better name for StrictPerlSections. "Strict" implies 'use strict' to most perl users, so it's a misleading name. Also may be it's better to have the feature name as a prefix and the sub-feature as a postfix. i.e. $Apache::Server::PerlSectionsStrict. For example use $Apache::Server::PerlSectionsNonFatal (not reversed logic), so only when it's set to 1, the errors will be non-fatal.


Moreover now that I think about it I'm not quite sure why in the world someone will want to turn this feature on. Can you please remind me why was it added at all? If someone wants that badly then can just wrap the whole section in the eval {} block.

Also here:

modperl_log_warn(s, apr_psprintf(p, "Syntax error at %s:%d %s",
directive->filename,
directive->line_num,
SvPVX(ERRSV)));

we should probably drop the word: Syntax, since it can be pretty much any error. Moreover the order of elements in the error is different from perl (and here we give a perl error). So I suggest:


             modperl_log_warn(s, apr_psprintf(p, "%s at %s line %d",
                                              SvPVX(ERRSV),
                                              directive->filename,
                                              directive->line_num));

but may be it's totally irrelevant if we drop that feature completely.

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to