Files
Config-General/t/cfg.16
Thomas von Dein 5e99e1f8b2 2.15 - fixed Bug in SaveConfig***, which didn't work.
- applied patch by Robb Canfield <robb@canfield.com>,
	   which fixes a bug in the variable interpolation
	   scheme. It did not interpolate blocks nor
	   blocknames. This patch fixes this. Patch slightly
	   modified by me(interpolation on block and blocknames).
	 - enhanced test for variable interpolation to
	   reflect this.
	 - added check if a named block occurs after the underlying
	   block is already an array, which is not possible.
	   perl cannot add a hashref to an array. i.e.:
	   <bl>
 	     a = 1
	   </bl>
	   <bl>
 	     b = 1
	   </bl>
	   <bl blubber>
 	     c = 1
	   </bl>
	   As you can see, "<bl>" will be an array, and "blubber"
	   cannot be stored in any way on this array.
	   The module croaks now if such construct occurs.


git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@41 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:26:40 +00:00

33 lines
503 B
Plaintext

# variable interpolation test
me=blah
pr=$me/blubber
<vars>
base = /usr
uid = 501
</vars>
<etc>
dir = $base/conf # $base should not be interpolated
base = /usr/local # set $base to a new value in this scope
log = ${base}/log/logfile # use braces
<users>
home = $base/home/max # $base should be interpolated
</users>
</etc>
# block(name) test
tag = dir
mono = teri
<$tag>
bl = 1
</$tag>
<$tag mono>
bl = 2
</$tag>
<text $mono>
bl = 3
</text>
<$tag $mono>
bl = 3
</$tag>