You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by go...@apache.org on 2003/02/26 10:32:54 UTC
cvs commit: modperl-2.0/src/modules/perl modperl_cmd.c
gozer 2003/02/26 01:32:54
Modified: . Changes STATUS
src/modules/perl modperl_cmd.c
Log:
$Apache::Server::StrictPerlSections added. When set to a true
value, will abort server startup if there are syntax errors
in <Perl > sections
Reviewed by: stas
Revision Changes Path
1.134 +4 -0 modperl-2.0/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl-2.0/Changes,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -r1.133 -r1.134
--- Changes 24 Feb 2003 03:52:22 -0000 1.133
+++ Changes 26 Feb 2003 09:32:53 -0000 1.134
@@ -10,6 +10,10 @@
=item 1.99_09-dev
+$Apache::Server::StrictPerlSections added. When set to a true
+value, will abort server startup if there are syntax errors
+in <Perl > sections [Philippe M. Chiasson <gozer@cpan.org]
+
Use Win32::GetShortPathName for Win32 to handle cases when
the supplied MP_AP_PREFIX contains spaces. [Randy Kobes]
1.35 +1 -2 modperl-2.0/STATUS
Index: STATUS
===================================================================
RCS file: /home/cvs/modperl-2.0/STATUS,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- STATUS 20 Feb 2003 00:41:51 -0000 1.34
+++ STATUS 26 Feb 2003 09:32:53 -0000 1.35
@@ -154,7 +154,6 @@
* Apache::PerlSections missing features for backwards compatibility:
- $Apache::Server::SaveConfig
- $Apache::ReadConfig::DocumentRoot
- - $Apache::Server::StrictPerlSections
- Apache::PerlSections->store(filename)
Report: Philippe M. Chiasson <go...@cpan.org>
1.38 +13 -1 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.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- modperl_cmd.c 21 Dec 2002 03:46:07 -0000 1.37
+++ modperl_cmd.c 26 Feb 2003 09:32:54 -0000 1.38
@@ -316,6 +316,8 @@
#define MP_DEFAULT_PERLSECTION_HANDLER "Apache::PerlSection"
#define MP_DEFAULT_PERLSECTION_PACKAGE "Apache::ReadConfig"
+#define MP_STRICT_PERLSECTIONS_SV \
+get_sv("Apache::Server::StrictPerlSections", FALSE)
MP_CMD_SRV_DECLARE(perldo)
{
@@ -369,7 +371,17 @@
eval_pv(arg, FALSE);
if (SvTRUE(ERRSV)) {
- return SvPVX(ERRSV);
+ SV *strict;
+ if ((strict = MP_STRICT_PERLSECTIONS_SV) && SvTRUE(strict)) {
+ return SvPVX(ERRSV);
+ }
+ else {
+ modperl_log_warn(s, apr_psprintf(p, "Syntax error at %s:%d %s",
+ parms->directive->filename,
+ parms->directive->line_num,
+ SvPVX(ERRSV)));
+
+ }
}
if (handler) {
Re: cvs commit: modperl-2.0/src/modules/perl modperl_cmd.c
Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> On Thu, 2003-02-27 at 06:13, Stas Bekman wrote:
>
>>Thanks gozer!
>>
>>One more thing. I'm not sure which manpage it should go to, but can you please
>>at least mention this option somewhere in the docs? I don't think it's
>>documented anywhere in 1.0 docs, so we won't remember it.
>>
>>Which manpage the <Perl> sections are (to-be) documented in?
>
>
> How about it's own section : Apache::PerlSection, the package that
> provides the default implementation ?
Recently I've posted a patch that glues pods to their respective .pm files.
The logic had to rely on the knowledge provided by Makefile, so it'd glue only
those pods who have a corresponding .pm files and since we already have
lib/Apache/PerlSection.pm the corresponsing pod should be the matching
api/Apache/PerlSection.pod.
> If that's okay, I'll finish up the leftover <Perl > items and write the
> docs myself ;-)
In any case, as long as you write them, we will find a place to stick them ;)
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: cvs commit: modperl-2.0/src/modules/perl modperl_cmd.c
Posted by "Philippe M. Chiasson" <go...@cpan.org>.
On Thu, 2003-02-27 at 06:13, Stas Bekman wrote:
> Thanks gozer!
>
> One more thing. I'm not sure which manpage it should go to, but can you please
> at least mention this option somewhere in the docs? I don't think it's
> documented anywhere in 1.0 docs, so we won't remember it.
>
> Which manpage the <Perl> sections are (to-be) documented in?
How about it's own section : Apache::PerlSection, the package that
provides the default implementation ?
If that's okay, I'll finish up the leftover <Perl > items and write the
docs myself ;-)
> __________________________________________________________________
> Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org http://ticketmaster.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
>
>
--
--------------------------------------------------------------------------------
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5
(122FF51B/C634E37B)
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107
88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so
ingenious.
perl
-e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'
Re: cvs commit: modperl-2.0/src/modules/perl modperl_cmd.c
Posted by Stas Bekman <st...@stason.org>.
Thanks gozer!
One more thing. I'm not sure which manpage it should go to, but can you please
at least mention this option somewhere in the docs? I don't think it's
documented anywhere in 1.0 docs, so we won't remember it.
Which manpage the <Perl> sections are (to-be) documented in?
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org