OSSP CVS Repository

ossp - Check-in [4660]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4660
Date: 2004-Jul-30 11:27:21 (local)
2004-Jul-30 09:27:21 (UTC)
User:thl
Branch:
Comment: allow very primitive quotation for values in config file using single or double quotes
Tickets:
Inspections:
Files:
ossp-pkg/snmpdx/snmpdx.pl      1.13 -> 1.14     4 inserted, 0 deleted

ossp-pkg/snmpdx/snmpdx.pl 1.13 -> 1.14

--- snmpdx.pl    2004/07/30 09:25:11     1.13
+++ snmpdx.pl    2004/07/30 09:27:21     1.14
@@ -550,6 +550,10 @@
         $line =~ s|\r?\n$||s;
         next if ($line =~ m/^\s*(#.*)?$/s);
         my ($option, $value) = ($line =~ m|^\s*(\S+)\s+(.+?)\s*$|s);
+        if ($value =~ m|^".*"$| or $value =~ m|^'.*'$|) {
+            $value =~ s|^.||;
+            $value =~ s|.$||;
+        }
         die "invalid configuration line \"$line\""
             if (not defined($option) or not defined($value));
         my ($var) = map  { $options{$_} }

CVSTrac 2.0.1