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 2005/03/10 23:20:23 UTC

svn commit: r156999 - in perl/modperl/trunk: Changes src/modules/perl/modperl_cmd.c

Author: gozer
Date: Thu Mar 10 14:20:21 2005
New Revision: 156999

URL: http://svn.apache.org/viewcvs?view=rev&rev=156999
Log:
Syntax errors in <Perl> sections were not correctly caught and
reported. eval_pv() doesn't preserve errors, use
eval_sv(sv, G_KEEPERR) instead.

Reported-By: Dominique Quatravaux <do...@idealx.com>


Modified:
    perl/modperl/trunk/Changes
    perl/modperl/trunk/src/modules/perl/modperl_cmd.c

Modified: perl/modperl/trunk/Changes
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/Changes?view=diff&r1=156998&r2=156999
==============================================================================
--- perl/modperl/trunk/Changes (original)
+++ perl/modperl/trunk/Changes Thu Mar 10 14:20:21 2005
@@ -12,6 +12,9 @@
 
 =item 1.999_22-dev
 
+Syntax errors in <Perl> sections were not correctly caught and
+reported. [Gozer]
+
 when building mp2 EU::MM looks into Apache-Test/MANIFEST and complains
 about the missing Apache-Test/META.yml (which is indeed not included
 in the modperl package due to the PAUSE problems of dealing with more

Modified: perl/modperl/trunk/src/modules/perl/modperl_cmd.c
URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/src/modules/perl/modperl_cmd.c?view=diff&r1=156998&r2=156999
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_cmd.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_cmd.c Thu Mar 10 14:20:21 2005
@@ -550,11 +550,13 @@
     }
 
     {
+        SV *code = newSVpv(arg, 0);
         GV *gv = gv_fetchpv("0", TRUE, SVt_PV);
         ENTER;SAVETMPS;
         save_scalar(gv); /* local $0 */
         sv_setpv_mg(GvSV(gv), directive->filename);
-        eval_pv(arg, FALSE);
+        eval_sv(code, G_SCALAR|G_KEEPERR);
+        SvREFCNT_dec(code);
         modperl_env_sync_srv_env_hash2table(aTHX_ p, scfg);
         modperl_env_sync_dir_env_hash2table(aTHX_ p, dcfg);
         FREETMPS;LEAVE;