X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=lib%2FGetConfig.pm;h=170ad3aaf86561fcfae4636bd52828b2e480b18c;hb=7367c4e247d11307e192458cf3a3183361268d96;hp=9ccf965030268d50c11eba5a0d31235543159c84;hpb=020a4a5ea2be725b155cae3a2cadc9aba3911b9b;p=clearscm.git diff --git a/lib/GetConfig.pm b/lib/GetConfig.pm index 9ccf965..170ad3a 100644 --- a/lib/GetConfig.pm +++ b/lib/GetConfig.pm @@ -48,11 +48,12 @@ yields =head1 DESCRIPTION -This module is a simple interface to reading config files. Config file -format is roughly like .XDefaults format - : pairs. A -hash of the name/value pairs are returned. Variable interpolation is -supported such that env(1) variables will be interpolated as well as -previously defined values. Thus: +This module is a simple interface to reading config files. Config file format is +roughly like .XDefaults format - : pairs. Note that you can use +either ':' or '=' as a separator between the name and value. A hash of the +name/value pairs are returned. Variable interpolation is supported such that +env(1) variables will be interpolated as well as previously defined values. +Thus: temp_files: tmp temp_dir: $HOME/$temp_files @@ -124,7 +125,7 @@ sub _processFile ($%) { next if /^\s*[\#|\!]/; # Skip comments - if (/\s*(\w*)\s*:\s*(.*)\s*$/) { + if (/\s*(.*?)\s*[:=]\s*(.*)\s*/) { my $key = $1; my $value = $2;