mirror of
https://codeberg.org/scip/Config-General.git
synced 2025-12-16 12:11:02 +01:00
- fixed rt.cpan.org#24232 - import ENV vars only if defined - fixed rt.cpan.org#20742 - dont' overwrite a var if re-defined in current scope, interpolation failed for re-defined vars and used the value of the var defined in outer scope, not the current one. - fixed rt.cpan.org#17852 - a 0 as blockname were ignored. applied patch by SCOP to t/run.t to test for 0 in blocks. - applied most hints Perl::Critic had about Config::General: o the functions ParseConfig SaveConfig SaveConfigString must now imported implicitly. This might break existing code, but is easily to fix. o using IO::File instead of open(). o General.pm qualifies for "stern" level after all. - added much more tests to t/run.t for 'make test'. - using Test::More now. git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@58 be1acefe-a474-0410-9a34-9b3221f2030f
33 lines
464 B
Plaintext
33 lines
464 B
Plaintext
# variable interpolation test
|
|
me=blah
|
|
pr=$me/blubber
|
|
<vars>
|
|
base = /usr
|
|
uid = 501
|
|
</vars>
|
|
|
|
base = /opt
|
|
<etc>
|
|
base = /usr # set $base to a new value in this scope
|
|
log = ${base}/log/logfile # use braces
|
|
<users>
|
|
home = $base/home/max # $base should be /usr, not /opt !
|
|
</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>
|