X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/a52a1004576857c1c1539b241aae1adab0b242b0..31b977d60bf4b65b265b4d742b433ffea855d540:/SL/Inifile.pm diff --git a/SL/Inifile.pm b/SL/Inifile.pm index aadec0af1..846459d5f 100644 --- a/SL/Inifile.pm +++ b/SL/Inifile.pm @@ -38,9 +38,9 @@ package Inifile; use IO::File; sub new { - $main::lxdebug->enter_sub(); + $main::lxdebug->enter_sub(2); - my ($type, $file) = @_; + my ($type, $file, %options) = @_; my $id = ""; my $skip; @@ -54,12 +54,16 @@ sub new { while () { 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 $_; @@ -84,7 +88,7 @@ sub new { } close FH; - $main::lxdebug->leave_sub(); + $main::lxdebug->leave_sub(2); return bless $self, $type; }