Config-Properties - Re: recurse on load?

Posted on Tue Nov 21 12:17:44 2006 by salva in response to 3586 (See the whole thread of 2)
Re: recurse on load?
yes, you can use a validator (an undocumented feature of Config::Properties, look in the module source for more info) to change properties as they are read:
sub my_validator { $_[2] =~ s/\$\{([\w\.]+)\}/$_[0]->getProperty($1)/ge } my $cfg = Config::Properties->new(...); $cfg->setValidator(\&my_validator); $cfg->read();
Write a response