[Catalyst] JSON instead of YAML?
Andrew Libby
andrew.libby at gmail.com
Wed Jan 25 17:07:17 CET 2006
Daniel Westermann-Clark wrote:
>On 2006-01-25 10:13:20 -0500, Andrew Libby wrote:
>
>
>>One thing that drives me crazy about YAML is my desire to have
>>variable references within my config file. I my short reading up on
>>YAML, it didn't seem to support that.
>>
>>
>
>[10:38:00 dwc at fortuna ~]$ cat refs.yml
>ref: &r
> key1: value1
> key2: value2
>deref: *r
>[10:38:14 dwc at fortuna ~]$ perl -MData::Dumper -MYAML -e 'print Dumper YAML::LoadFile("refs.yml");'
>$VAR1 = {
> 'ref' => {
> 'key2' => 'value2',
> 'key1' => 'value1'
> },
> 'deref' => $VAR1->{'ref'}
> };
>
>IIRC, YAML calls them anchors and aliases.
>
>You might also find the YAML cookbook helpful:
>
>http://yaml4r.sourceforge.net/cookbook/
>
>
>
Thanks Daniel. Clearly I didn't do enough research. This helps
considerably. I'll read up on anchors and aliases.
Andy
--
Andrew Libby
alibby at philadelphiariders.com
http://philadelphiariders.com/
Motorcycle Enthusiasm, Fishtown Style
1999 SV650
1999 Laverda 750S
1996 BMWR1100RS
1981 Moto Guzzi CX100 (in Lemans I clothing)
More information about the Catalyst
mailing list