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/03/17 07:46:56 UTC
cvs commit: modperl-2.0/t/response/TestDirective perldo.pm
gozer 2003/03/16 22:46:56
Modified: src/modules/perl modperl_cmd.c
t/conf extra.last.conf.in
t/response/TestDirective perldo.pm
Log:
When stitching content of <Perl > sections together, it's important to
preserve a \n between the lines, otherwise, the first encountered comment
will eat all the code after it. Also would break HERE documents, etc.
Revision Changes Path
1.41 +1 -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.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- modperl_cmd.c 4 Mar 2003 09:42:42 -0000 1.40
+++ modperl_cmd.c 17 Mar 2003 06:46:55 -0000 1.41
@@ -297,7 +297,7 @@
}
/*XXX: Less than optimal */
- code = apr_pstrcat(p, code, line, NULL);
+ code = apr_pstrcat(p, code, line, "\n", NULL);
}
/* Here, we have to replace our current config node for the next pass */
1.7 +2 -0 modperl-2.0/t/conf/extra.last.conf.in
Index: extra.last.conf.in
===================================================================
RCS file: /home/cvs/modperl-2.0/t/conf/extra.last.conf.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- extra.last.conf.in 4 Mar 2003 09:42:42 -0000 1.6
+++ extra.last.conf.in 17 Mar 2003 06:46:55 -0000 1.7
@@ -17,6 +17,8 @@
$Location{'/perl_sections_saved'} = {
'AuthName' => 'PerlSection',
};
+#This is a comment
+$TestDirective::perl::comments="yes";
</Perl>
### --------------------------------- ###
1.3 +3 -1 modperl-2.0/t/response/TestDirective/perldo.pm
Index: perldo.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perldo.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- perldo.pm 4 Mar 2003 09:42:42 -0000 1.2
+++ perldo.pm 17 Mar 2003 06:46:56 -0000 1.3
@@ -10,7 +10,7 @@
sub handler {
my $r = shift;
- plan $r, tests => 4;
+ plan $r, tests => 5;
ok t_cmp('yes', $TestDirective::perl::worked);
@@ -19,6 +19,8 @@
ok exists $Apache::ReadConfig::Location{'/perl_sections_saved'};
ok t_cmp('PerlSection', $Apache::ReadConfig::Location{'/perl_sections_saved'}{'AuthName'});
+
+ ok t_cmp('yes', $TestDirective::perl::comments);
Apache::OK;
}