I am in the process of moving to modperl2 and was tripped up by the
problem with @PerlConfig that Apache2::PerlSections has. I came across
your post from last October but it does not look as though the fix you
suggested then has been taken up.

As per your post, there are two issues here affecting sections
in httpd.conf:
a) @PerlConfig gets ignored.
b) If $PerlConfig (or an entry in @PerlConfig) is multi-line then it
does not get processed correctly (see page 422 of Writing Apache
Modules with Perl and C for examples that worked in mod perl 1).

Your suggested fix cured(a). I've extended your fix to cure (b) in a
way that seems to work for me.

The following is an extract from the config file in a freestanding
test module I created for this problem. It shows both of the issues
and the workaround.

# .....the following is the workaround that makes it work.

use Apache2::PerlSections;
*Apache2::PerlSections::dump_special = sub {
my ($self, @data) = @_;
foreach my $item (@data) {
next unless defined $item;
foreach my $line (split /\n/ , $item) {

#.....the following causes syntax error

$PerlConfig = "perlsetvar var1 1\n";
$PerlConfig .= "perlsetvar var2 2\n";

#....the following is ignored

push @PerlConfig, < perlsetvar varA A
perlsetvar varB B
push @PerlConfig, < perlsetvar varC C
perlsetvar varD D

I didn't attach it here, but if anybody wants a copy of the test module
please ask.