projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Image, Shop, Weight wieder rein
[kivitendo-erp.git]
/
SL
/
Inifile.pm
diff --git
a/SL/Inifile.pm
b/SL/Inifile.pm
index
aadec0a
..
2331ca7
100644
(file)
--- a/
SL/Inifile.pm
+++ b/
SL/Inifile.pm
@@
-40,7
+40,7
@@
use IO::File;
sub new {
$main::lxdebug->enter_sub();
sub new {
$main::lxdebug->enter_sub();
- my ($type, $file) = @_;
+ my ($type, $file
, %options
) = @_;
my $id = "";
my $skip;
my $id = "";
my $skip;
@@
-54,12
+54,16
@@
sub new {
while (<FH>) {
chomp;
while (<FH>) {
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 $_;
next unless $_;