[Catalyst] JSON instead of YAML?

Bill Moseley moseley at hank.org
Wed Jan 25 15:15:24 CET 2006


On Wed, Jan 25, 2006 at 06:56:07AM +0100, Sebastian Riedel wrote:
> After all the trouble with the current YAML implementation (Spiffy in  
> production code is just too dangerous...), i've been thinking about  
> moving to JSON for the default config.
> 
> myapp.json:
> 
>     {
>         "name": "MyApp"
>         "Foo": "Bar"
>     }

Why not perl?

    {
        name => 'MyApp',
        Foo  => 'Bar',
    };

Doesn't seem that much different.

I have a few things where I use perl for the config file.  Plus,
sometimes programmable config files come in handy. ;)

    {
        name => `hostname` =~ /dev/ ? 'TestApp' : 'MyApp',
        Foo  => 'Bar',
    };

Oh the scary things I've done in httpd.conf <perl> sections.


-- 
Bill Moseley
moseley at hank.org




More information about the Catalyst mailing list