Ok, thats it. With this script i was able to test the YML and it was indeed invalid. After validating everything works like a charm.

Thanks :-)
 Johannes
Jonathan Rockway schrieb:
On Saturday 12 May 2007 11:09:26 am John Romkey wrote:
You'll see that message even if there's an error in the config file.
YAML is very sensitive about whitespace. Try running the file through
ysh, the YAML shell, to check for errors.

This is a waste of time. I recommend adding a test to your test suite that validates the YAML with Test::YAML::Valid:

   #!/usr/bin/env perl
   use strict;
   use warnings;
   use Test::More tests => 2;
   use Test::YAML::Valid;

   my $CONFIG = 'myapp.yml';

   ok(-e $CONFIG, "$CONFIG exists");
   yaml_file_ok($CONFIG ,"$CONFIG validates");

Now you never have to worry about invalid YAML again. (You might /have/ it, but you won't have to /worry/ about it ;)

Regards,
Jonathan Rockway



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

Reply via email to