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
--
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;
pgpjWyYFWPZFh.pgp
Description: PGP signature
_______________________________________________ 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/
