in reply to YAML + template/reuse

Well, YAML files are text files, which means you can solve your problem with the usual text templating modules, like Template::Toolkit, Text::Template and even HTML::Template::Compiled.

Alternatively you can build a default yaml config file and an overriding yaml config, and merge these (for example with Hash::Merge, or "manually") and write a resulting yaml file from the result.

Replies are listed 'Best First'.
Re^2: YAML + template/reuse
by Anonymous Monk on Nov 30, 2007 at 14:21 UTC

      BTW, when merging can I delete some keys? Something like:

      # parent.yaml foo: bar: 2 baz: 3 # child.yaml foo: bar: 4 # override foo/bar *baz: whatever # undefine baz, prompt users to choose
      OR baz: delete!

      I don't see that option in Hash::Merge. Other module, perhaps?