summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow (pluto.buetow.org) <paul@buetow.org>2013-09-28 21:46:35 +0200
committerPaul Buetow (pluto.buetow.org) <paul@buetow.org>2013-09-28 21:46:35 +0200
commit2fae246fe7ceceb7466cf89dd78aa963f5eed4e8 (patch)
treeab030fa9ca927c8ef3c366696121d2e0703b0d0a
parent047298aeeda3f7f35323f8762a5a2a351b6d999f (diff)
Allow comments in config file
-rw-r--r--Xerl/Page/Configure.pm3
-rw-r--r--xerl.conf3
2 files changed, 2 insertions, 4 deletions
diff --git a/Xerl/Page/Configure.pm b/Xerl/Page/Configure.pm
index b19aec1..972a805 100644
--- a/Xerl/Page/Configure.pm
+++ b/Xerl/Page/Configure.pm
@@ -28,7 +28,8 @@ sub parse($) {
my $re = qr/^(.+?) *=(.+?) *\n?$/;
for ( @{ $file->get_array() } ) {
- next if /^ *#/;
+ next if /^\s*#/;
+ s/#.*//;
$self->setval( $1, $self->eval($2) ) if $_ =~ $re;
}
diff --git a/xerl.conf b/xerl.conf
index 5873c22..bb1e7d5 100644
--- a/xerl.conf
+++ b/xerl.conf
@@ -1,7 +1,4 @@
-# TODO: Allow comments behind the options!
-# defaultproto will be used if not ENV(HTTPS)==on
#nocache=defined
-#nocache=1
cacheroot=/usr/local/www/xerlcache/
ctype.asc=text/plain
ctype.css=text/css