diff options
| author | Paul Buetow (pluto.buetow.org) <paul@buetow.org> | 2013-09-28 21:46:35 +0200 |
|---|---|---|
| committer | Paul Buetow (pluto.buetow.org) <paul@buetow.org> | 2013-09-28 21:46:35 +0200 |
| commit | 2fae246fe7ceceb7466cf89dd78aa963f5eed4e8 (patch) | |
| tree | ab030fa9ca927c8ef3c366696121d2e0703b0d0a | |
| parent | 047298aeeda3f7f35323f8762a5a2a351b6d999f (diff) | |
Allow comments in config file
| -rw-r--r-- | Xerl/Page/Configure.pm | 3 | ||||
| -rw-r--r-- | 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; } @@ -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 |
