[html-formfu] single yaml file - multi documents
Carl Franks
fireartist at gmail.com
Thu Nov 1 10:27:21 GMT 2007
I've added support for YAML's multi-documents-in-a-single-stream feature.
In YAML, "---" starts a new document. This means you can now do:
---
elements:
- name: foo
- name: bar
---
load_config_file: ext.yml
And the ext.yml file will be loaded _after_ the elements.
(Previously, load_config_file() would always be called before
elements(), regardless of its position in the config).
The Config::Any maintainers didn't seem keen on adding this to
Config::Any, so load_config_file() now uses YAML::Syck itself to load
any files matching /\.ya?ml/i and only passes other file types off to
Config::Any.
A side-effect of this is that errors in yaml files will no longer be
silently ignored - they will cause fatal errors. - I consider this a
feature!
Carl
More information about the HTML-FormFu
mailing list