
jlmartinez-lists-catalyst at capside
Jun 11, 2009, 3:22 AM
Post #1 of 1
(274 views)
Permalink
|
|
Propose: Make application abort loading when it encounters malformed config files
|
|
Hi, From time to time I keep stumbling upon this issue: when I malform the yaml config file for my app: the app loads up, and then strange things happen. My configs are normally parted between the MyApp.pm file, for things that the user will never configure, and the yaml config file, for things that the user will be able to customize. So just after touching a config file, if the app does something strange, I do a "cat xxx.yml | ysh" and find that YAML Error: Invalid element in map Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT Line: 28 Document: 1 at /usr/share/perl5/YAML.pm line 33 ...oops... I think it would be nice to have ConfigLoader stop the loading of the app if it has come across a malformed config file. I've looked around the code, and don't know who to blame/patch, Config::Any or Catayst::Plugin::ConfigLoader. Any tips? Jose Luis Martinez jlmartinez[at]capside.com _______________________________________________ List: Catalyst[at]lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
|