"Carl Vincent" <[EMAIL PROTECTED]> writes:

> 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 tend to add a unit test for this (using Test::YAML::Valid).  Here's
one from Angerwhale:

    use strict;
    use warnings;
    use Test::More tests => 2;
    use Test::YAML::Valid;
    
    ok(-e 'angerwhale.yml');
    yaml_file_ok('angerwhale.yml','angerwhale.yml validates');

Regards,
Jonathan Rockway

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to