Stas Bekman wrote:

> Philippe M. Chiasson wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>
>> Kim Goldov wrote:
>>
>> | I'm using a <Perl> section to configure name virtual hosts. I
>> would | like to have multiple aliases defined in each virtual
>> host, however | I was only able to define a single alias in the
>> virtual host.
>>
>> Seems you've uncovered a small bug in the <Perl> sections.
>>
>> Does the following patch solve the problem for you ?
>>
>> Index: lib/Apache/PerlSections.pm
>> ===================================================================
>>  RCS file: /home/cvs/modperl-2.0/lib/Apache/PerlSections.pm,v
>> retrieving revision 1.5 diff -u -I$Id -r1.5 PerlSections.pm - ---
>> lib/Apache/PerlSections.pm  9 Jul 2004 08:01:20 -0000       1.5
>> +++ lib/Apache/PerlSections.pm  6 Aug 2004 21:20:36 -0000 @@
>> -172,7 +172,12 @@ ~         $self->add_config("$name $$entry\n");
>>  ~     } ~     elsif ($type eq 'ARRAY') { - -
>> $self->add_config("$name @$entry\n"); +        if (grep { ref($_)
>> } @$entry) { +            $self->dump_entry($name, $_) for
>> @$entry; +        } +        else { +
>> $self->add_config("$name @$entry\n"); +        } ~     } ~
>> elsif ($type eq 'HASH') { ~         $self->dump_hash($name,
>> $entry);
>
>
> Hmm, what kind of patch is that? What's '~' instead of '-'?
>
No clue, my god, my mail client must have gone crazy on me for a
moment there ;-/



? make.log
Index: lib/Apache/PerlSections.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/PerlSections.pm,v
retrieving revision 1.5
diff -u -I$Id -r1.5 PerlSections.pm
--- lib/Apache/PerlSections.pm	9 Jul 2004 08:01:20 -0000	1.5
+++ lib/Apache/PerlSections.pm	6 Aug 2004 22:30:01 -0000
@@ -172,7 +172,12 @@
         $self->add_config("$name $$entry\n");
     }
     elsif ($type eq 'ARRAY') {
-        $self->add_config("$name @$entry\n");
+        if (grep { ref($_) } @$entry) {
+            $self->dump_entry($name, $_) for @$entry;
+        }
+        else {
+            $self->add_config("$name @$entry\n");
+        }
     }
     elsif ($type eq 'HASH') {
         $self->dump_hash($name, $entry);

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to