[html-formfu] single yaml file - multi documents

Ruben Fonseca rubenfonseca at di.uminho.pt
Fri Nov 2 10:20:25 GMT 2007


On 2007/11/01, at 10:27, Carl Franks wrote:

> 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!

Indeed it is! I can't tell you how many times I lost time with FormFu  
not working just becuase a YAML file had an error...

Lately I've been checking the files with $ cat file | ysh :-)

Great work!
Rúben

---------------------------------------------------------
Rúben Fonseca <ruben.fonseca at log.pt>
Technical Consultant
log <www.log.pt>

Tel: +351 21 330 42 20
Fax: +351 21 330 42 19
Calçada Marquês de Abrantes, 45 - 3º Dto
1200-718 Lisboa
---------------------------------------------------------






More information about the HTML-FormFu mailing list