[Dancer-users] YAML, why?
Alexis Sukrieh
sukria at sukria.net
Wed Sep 22 15:54:43 CEST 2010
Le 22/09/2010 14:24, P Kishor a écrit :
>> Configuration files, on the other hand, are not meant to be written with a
>> programming language.
>
> who says so? I use PDL (Perl Data Language), a highly complex and
> powerful software, probably the most complex I have ever used, and all
> its configuration required to build it are done using a extremely
> readable perl data structure.
Well, Dancer has been written with one main idea in mind: everything
should be simple and intuitive.
If there is one reason why people like Dancer, it's because of that:
it's simple, intuitive and elegant.
YAML configuration files contribute to that, it's very handy to just
drop a list of key/value pairs in one config.yml file and just start
working.
Of course you can find many examples of applications whose configuration
files are written with a programming language, but I dislike that.
Because if you let the user write his configuration files with a script,
sooner or later someone will start putting code inside, and that's a
pandora box.
>> YAML is a very good and well-kown format for
>> human-readable configuration files.
>>
>
> Again, who says so? citations?
My experience tells me that. Again, if you want to write pure perl
Dancer settings, you can do it. YAML files are there for people who want
to keep their settings outside of their code.
> Besides, who wants human-readable? I want programmer-readable. No
> human reads the config files on a daily basis, but my computer does
> all the time. I just gave you an example above where a simple
> indentation can cause misunderstanding both to the human and the
> computer.
I precisely want human-readable here. Again, Dancer is meant to be as
easy to handle as possible. It's a key feature. You won't make me change
my mind on this ;)
Of course, if you really like, you can write a plugin that will do what
you want.
Regards,
--
Alexis Sukrieh
More information about the Dancer-users
mailing list