Geoffrey Young wrote: >> > this patch seems to have stalled: >> >> > http://marc2.theaimsgroup.com/?l=apache-modperl-dev&m=114021879222434&w=2 >> >> > can you give it a whirl and see if it fixes things? >> >> Thanks! >> >> It doesn't fix the bug I reported. >> >> But it brings me closer to a workaround. It allows me to write the >> pretty weird looking config file: >> >> <Perl> >> @PerlConfig = split /\n/, <<EOC; >> Alias /ping/ /tmp/ping/ >> <IfModule mod_asis.c> >> </IfModule> >> EOC >> </Perl> >> >> Before the patch I had no success with @PerlConfig, so apparently >> Frank's patch fixes @PerlConfig. >> >> For the bug I am reporting, there's something missing to split config >> lines into single directives. > > ok, thanks for trying :) > > I'm including gozer here, since he is the main PerlConfig guy - I > wouldn't want to step on his toes trying to implement a fix for this > issue. but it we harp on him he will probably have an answer in a > matter of seconds ;)
Slightly longer than a few seconds, but here is a patch that will probably fix this issue as well as the the one linked to. > separately, we're going to need to ping you for apml maint, um, now :) Hu? What's that about ? -------------------------------------------------------------------------------- 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
Index: t/conf/extra.last.conf.in =================================================================== --- t/conf/extra.last.conf.in (revision 420603) +++ t/conf/extra.last.conf.in (working copy) @@ -111,3 +111,23 @@ Perl 1 </VirtualHost> </IfDefine> + +#Single-line $PerlConfig +<Perl> + $PerlConfig = "Alias /perl_sections_perlconfig_scalar @DocumentRoot@"; +</Perl> + +#Multi-line $PerlConfig +<Perl> + $PerlConfig = "Alias /perl_sections_perlconfig_scalar1 @DocumentRoot@ + Alias /perl_sections_perlconfig_scalar2 @DocumentRoot@ + "; +</Perl> + [EMAIL PROTECTED] +<Perl> + @PerlConfig = ("Alias /perl_sections_perlconfig_array1 @DocumentRoot@", + "Alias /perl_sections_perlconfig_array2 @DocumentRoot@", + ); +</Perl> + Index: t/response/TestDirective/perldo.pm =================================================================== --- t/response/TestDirective/perldo.pm (revision 420603) +++ t/response/TestDirective/perldo.pm (working copy) @@ -4,6 +4,7 @@ use warnings FATAL => 'all'; use Apache::Test; +use Apache::TestRequest; use Apache::TestUtil; use Apache2::Const -compile => 'OK'; use Apache2::PerlSections; @@ -11,7 +12,7 @@ sub handler { my $r = shift; - plan $r, tests => 17; + plan $r, tests => 22; ok t_cmp('yes', $TestDirective::perl::worked); @@ -58,6 +59,16 @@ my $vport = $TestDirective::perl::vhost_server->port; ok defined $bport && defined $vport && $vport != $bport; + foreach my $url (qw(scalar scalar1 scalar2)) { + my $res = GET "/perl_sections_perlconfig_$url/"; + ok t_cmp($res->is_success, 1, '$PerlConfig'); + } + + foreach my $url (qw(array1 array2)) { + my $res = GET "/perl_sections_perlconfig_$url/"; + ok t_cmp($res->is_success, 1, '@PerlConfig'); + } + Apache2::Const::OK; } Index: lib/Apache2/PerlSections.pm =================================================================== --- lib/Apache2/PerlSections.pm (revision 420603) +++ lib/Apache2/PerlSections.pm (working copy) @@ -65,8 +65,11 @@ { no strict 'refs'; foreach my $package ($self->package) { - $self->dump_special(${"${package}::$special"}, - @{"${package}::$special"} ); + my @config = map { split /\n/ } + grep { defined } + (@{"${package}::$special"}, + ${"${package}::$special"}); + $self->dump_special(@config); } } @@ -193,10 +196,12 @@ } sub add_config { - my ($self, $config) = @_; - return unless defined $config; - chomp($config); - push @{ $self->directives }, $config; + my ($self, @config) = @_; + foreach my $config (@config) { + return unless defined $config; + chomp($config); + push @{ $self->directives }, $config; + } } sub post_config {
signature.asc
Description: OpenPGP digital signature