[Dancer-users] config.yml YAML tabs vs spaces

Alex Mestiashvili alex at biotec.tu-dresden.de
Thu Nov 10 14:39:14 CET 2011


Hello ,

I just started to use Dancer::Plugins::Database and spent some time
trying yo figure out why the config from the manual doesn't work for me .

The problem ( or a feature )  that YAML doesn't treat tabs as whitespace
, and I was getting the following croaks :

perl bin/q.pl
Unable to parse the configuration file:
/home/toor/dancer/MyWeb-App/config.yml: Died at
/usr/share/perl5/YAML/Loader.pm line 674, <$IN> line 1.
 at /usr/share/perl5/Dancer/Config.pm line 204
       
Dancer::Config::load_settings_from_yaml('/home/toor/dancer/MyWeb-App/config.yml')
called at /usr/share/perl5/Dancer/Config.pm line 181
        Dancer::Config::load('Dancer::Config') called at
/usr/share/perl5/Dancer.pm line 212
        Dancer::import('Dancer') called at bin/q.pl line 1
        main::BEGIN() called at /usr/share/perl5/Dancer.pm line 1
        eval {...} called at /usr/share/perl5/Dancer.pm line 1
BEGIN failed--compilation aborted at bin/q.pl line 1.


using spaces solved the problem .
So I think that it will be not bad to mention somewhere in the
documentation that tabs shouldn't be used in config.yml .

Thank you ,
Alex



More information about the Dancer-users mailing list