From 2fae246fe7ceceb7466cf89dd78aa963f5eed4e8 Mon Sep 17 00:00:00 2001 From: "Paul Buetow (pluto.buetow.org)" Date: Sat, 28 Sep 2013 21:46:35 +0200 Subject: Allow comments in config file --- Xerl/Page/Configure.pm | 3 ++- xerl.conf | 3 --- 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 -- cgit v1.2.3