99soft/rocoto — pull request #3 by picpoc (2012-09-14 01:30:53+00:00)
Title: Extending variables resolving capabilities

- Add support for variables in default value

```
property=${not.found|${not.found.again|Crap!}}

# property = Crap!

not.found.again=Fallback!

# property = Fallback!
...
```

- Add support for dynamic variables

```
hello.en=Hi!
hello.fr=Salut !
hello.i18n=${hello.${locale|en}}

# hello.i18n = Hi!

locale=fr

# hello.i18n = Salut!
```
- Prevent infinite loop for recursive variables

```
# Will not thow a stack overflow
GNU=${GNU}'s Not UNIX
```

- Add support for configuration hell and free headaches

```
g=2g
gg2=2
h=${${${g}4|${g}2}}
2g=gg
2g2=4
gg=${h}${4|${${2g}2}}

# gg=42
```

- Add test cases relative to variables resolving.

May need some refactoring and optimization.