Bug#309721: Here is the patch :-/

Gunnar Wolf Gunnar Wolf <gwolf@gwolf.org>, 309721@bugs.debian.org
Thu, 19 May 2005 10:49:04 -0500


--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Sorry, didn't attach it.

-- 
Gunnar Wolf - gwolf@gwolf.org - (+52-55)1451-2244 / 5623-0154
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF

--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="libapache-configfile-perl.patch"

--- /usr/share/perl5/Apache/ConfigFile.pm	2004-10-11 11:48:39.000000000 -0500
+++ cvs/pkg-perl/packages/libapache-configfile-perl/trunk/ConfigFile.pm	2005-05-19 10:46:56.267775608 -0500
@@ -212,15 +212,28 @@
     my $cmd_context = $conf;
     my @parselevel = ();
     my $line = 0;
+    my $cont_confline = '';
 
-    foreach (@conf) {
+    foreach my $confline (@conf) {
         $line++;
 
+	# Handle line continuation when a trailing \ is found
+	if ($cont_confline) {
+	    # This line is a continuation
+	    $confline = "$cont_confline $confline";
+	    $cont_confline = '';
+	} 
+	if ($confline =~ /^(.+)\\\s*$/) {
+	    # This line continues in the next one
+	    $cont_confline = $1;
+	    next;
+	}
+
         # Strip newlines/comments
-        s/\s*#.*//;
+        $confline =~ s/\s*#.*//;
 
         # If nothing's left, continue
-        next unless $_;
+        next unless $confline;
 
         # This substitutes in re-used variable on the right side of the file
         # We have to handle the ignore_case flag hence the expression
@@ -228,17 +241,17 @@
         # are visible for re-substitution
         if ($self->{expand_vars}) { 
             local($^W) = 0 ;
-            s#\$\{?(\w+)\}?#my $k =  $self->_fixcase($1);$conf->{$k}#eg;
+            $confline =~ s#\$\{?(\w+)\}?#my $k =  $self->_fixcase($1);$conf->{$k}#eg;
         }
 
         # This may be a <stuff> junk </stuff>, in which case we need
         # to nest our data struct!
-        if (m#^\s*</(\S+)\s*>\s*$#) {
+        if ($confline =~ m#^\s*</(\S+)\s*>\s*$#) {
             # match </close> - walk up
             $cmd_context = pop @parselevel;
             $self->_error("$file line $line: Mismatched closing tag '$1'") unless $cmd_context;
             next;
-        } elsif (m#^\s*<(\S+)\s*(["']*)(.*)\2>\s*$#) {
+        } elsif ($confline =~ m#^\s*<(\S+)\s*(["']*)(.*)\2>\s*$#) {
             # create new sublevel in parsing
             my $k = $self->_fixcase($1);
             push @parselevel, $cmd_context;
@@ -261,8 +274,8 @@
 
         # Split up the key and the value. The @val regexp code dynamically
         # differentiates between "space strings" and array, values.
-        my($key, $r) = m!^\s*\s*(\w+)\s*(?=\s+)(.*)!;             # split up key
-        my(@val)     = $r =~ m!\s+(?:"([^"]*[^\\])"|([^\s,]+))\n?!g;   # split up val
+        my($key, $r) = $confline =~ m!^\s*\s*(\w+)\s*(?=\s+)(.*)!;             # split up key
+        my(@val)     = $r =~ m!\s+(?:\"([^\"]*[^\\])\"|([^\s,]+))\n?!g;   # split up val
         @val = grep { defined } @val;                             # lose undef values
 
         # Check for "on/off" or "true/false" or "yes/no"

--J2SCkAp4GZ/dPZZf--