Erzeugnisse fertigen, erste Version fertiggestellt. Bugzilla noch oeffnen fuer rueckv...
[kivitendo-erp.git] / SL / Inifile.pm
index f7fe27b..2331ca7 100644 (file)
@@ -40,7 +40,7 @@ use IO::File;
 sub new {
   $main::lxdebug->enter_sub();
 
-  my ($type, $file) = @_;
+  my ($type, $file, %options) = @_;
 
   my $id = "";
   my $skip;
@@ -52,16 +52,18 @@ sub new {
   open FH, "$file" or Form->error("$file : $!");
 
   while (<FH>) {
-    next if m/^(#|;|\s)/;
-
     chomp;
 
-    # strip comments
-    s/(#|;).*//g;
+    if (!$options{verbatim}) {
+      # strip comments
+      s/\#.*//;
 
-    # remove any trailing whitespace
-    s/^\s*//;
-    s/\s*$//;
+      # remove any trailing whitespace
+      s/^\s*//;
+      s/\s*$//;
+    } else {
+      next if (m/^\s*\#/);
+    }
 
     next unless $_;