[Catalyst] Hair-pulling over YAML config

Carl Franks fireartist at gmail.com
Mon Jan 29 16:30:36 GMT 2007


On 29/01/07, Carl Vincent <C.A.Vincent at newcastle.ac.uk> wrote:
> Hi everyone,
>
> I've just spent an inordinate amount of time debugging a problem which
> was actually caused by my Yaml config file not parsing properly.
> Catalyst isn't helping much - all it does is skip out the line of debug
> that says "[debug] Loaded Config ..." and that's easy to overlook.
>
> I discovered that when the file is loaded in Config::Any, if there's an
> error with the parsing it just skips it and doesn't bother to alert
> anyone.
>
> Is there a smart way to test for your config file failing to parse?
>
> I've patched my Config::Any (attached below) so it throws a warning. Not
> sure if this would cause problems if it was included in the distributed
> module...

I've had the same troubles today too!

How about a Test::YAML, in the same vein as Test::Pod, providing a
all_yaml_files_ok() rountine which accepts a list of files or
directories to check?

Carl



More information about the Catalyst mailing list