Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

[Patch mp2] Deprecate $Apache::Server::StrictPerlSections in favor of a def: msg#00185

apache.mod-perl.devel

Subject: [Patch mp2] Deprecate $Apache::Server::StrictPerlSections in favor of a default of 1

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/3D11A4E5.6010202@xxxxxxxxxx

--
--------------------------------------------------------------------------------
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

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
version-control...    qnx.openqnx.dev...    redhat.rhn.user...    ietf.openpgp/20...    mail.mutt.user/...    web.microformat...    java.sync4j.use...    education.ezpro...    user-groups.blu...    solaris.manager...    org.fitug.debat...    technology.erps...    politics.activi...    linux.redhat.fe...    bug-tracking.ma...    xfce.user/2004-...    hams/2004-11/ms...    kde.users.pim/2...    culture.cooking...    freebsd.devel.x...    gnu.m4.adhoc/20...    ngpt.user/2002-...    apple.fink.deve...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation