[Catalyst] YAML vs. *
fireartist at gmail.com
Mon Jun 12 16:23:25 CEST 2006
On 09/06/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> Carl Franks wrote:
> > I think what would make me happy would be to simply have the
> > auto-generated yaml config file have a half-dozen or so lines of
> > comments at the top, containing a brief overview of the syntax and any
> > vital reminders such as "Don't use tabs!"
> I like. And I think with the amount of already-extant documentation using
> YAML, this is probably the lowest-friction answer as well.
> Fancy putting together a quick cheatsheet as a Catalyst::Helper patch?
My initial estimate of "a half dozen or so" lines of comments was
To keep it readable, it's currently at 30 lines.
Any suggestions of what could be trimmed out?
Different layout suggestions?
(Lines are currently limited to 78 chars)
# Lines starting with "#" are comments.
# Indent each new level with an equal number of space characters.
# Tab characters cannot be used to indent.
# A plain key/value pair ( ensure there is a space after the ":" )
# An empty value
# A List ( ensure there is a space after the "-" )
# - value 1
# - value 2
# Nested key/values
# nested key 1: value
# nested key 2: value
# With a single-quoted value, use 2 quotes to represent a literal quote
#key: 'single quote '' with a value'
# Double-quoted values can contain escaped characters, such as newlines "\n"
#key: "line 1\n line 2"
# Multiline values start with the ">" character. Line-folding is applied.
# After processing, the linebreak between these 2 lines
# will be removed.
More information about the Catalyst