Bug#329154: possible solution

Jason Thomas jason at debian.org
Tue Sep 27 23:32:02 UTC 2005


This patch removes the error and makes the key available from the
object with no value.

not sure if its the right way to do it.


--- ConfigFile.pm.orig	2005-09-28 09:11:00.000000000 +1000
+++ ConfigFile.pm	2005-09-28 09:26:43.000000000 +1000
@@ -275,6 +275,7 @@
         # Split up the key and the value. The @val regexp code dynamically
         # differentiates between "space strings" and array, values.
         my($key, $r) = $confline =~ m!^\s*\s*(\w+)\s*(?=\s+)(.*)!;             # split up key
+        ($key, $r) = ($confline, 1) unless $key;
         my(@val)     = $r =~ m!\s+(?:\"([^\"]*[^\\])\"|([^\s,]+))\n?!g;   # split up val
         @val = grep { defined } @val;                             # lose undef values
 




More information about the pkg-perl-maintainers mailing list