X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FInifile.pm;h=2331ca7712d1ddbf7613151ef2952bce3c764d2c;hb=611a3dd324e413b4653c850546e50a0a7336a8bc;hp=f7fe27b3c60fd7afa3c0bdee0a6f616f97dc663b;hpb=db53dc8ab328b82c7af17896487674ad98f2af6b;p=kivitendo-erp.git diff --git a/SL/Inifile.pm b/SL/Inifile.pm index f7fe27b3c..2331ca771 100644 --- a/SL/Inifile.pm +++ b/SL/Inifile.pm @@ -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 () { - 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 $_;