You're kidding, right??!?

I've given up sliced bread for breakfast in favour of YAML! I've done a number of projects which have a lot of configuration, and YAML makes this as easy as pie. Or sliced bread.

Call me a liar, ... oh you did already... but which of these is easier to read and maintain:

#### YAML ##### feed_config: file: type: xml pattern: *.xml record_tag: Group1 object_tags: notice: . event: .Event contact: . image: . field_map: notice: urn: URN notice_type: Class source: Pub create_date: Pubdate text: Text text2: Sample contact: email: Email firstname: Contact surname: Contact event: title: Title event_type: Type date: Date start_time: StartTime end_time: EndTime image: urn: URN translations: notice: notice_type: BMD - Deaths: memorial source: Daily Express: de create_date: '{(\d+)/(\d+)/(\d+)}{20$3/$2/$1}' event: event_type: Funeral: funeral #### PERL ##### $feed_config = { 'object_tags' => { 'notice' => '.', 'contact' => '.', 'event' => '.Event', 'image' => '.' }, 'translations' => { 'notice' => { 'source' => { 'Daily Express' => 'de' }, 'notice_type' => { 'BMD - Deaths' => 'memorial' }, 'create_date' => '{(\\d+)/(\\d+)/(\\d+)}{20$3/$2/$1}' }, 'event' => { 'event_type' => { 'Funeral' => 'funeral' } } }, 'record_tag' => 'Group1', 'file' => { 'pattern' => '*.xml', 'type' => 'xml' }, 'field_map' => { 'notice' => { 'source' => 'Pub', 'text2' => 'Sample', 'notice_type' => 'Class', 'urn' => 'URN', 'text' => 'Text', 'create_date' => 'Pubdate' }, 'contact' => { 'firstname' => 'Contact', 'email' => 'Email', 'surname' => 'Contact' }, 'event' => { 'end_time' => 'EndTime', 'date' => 'Date', 'event_type' => 'Type', 'start_time' => 'StartTime', 'title' => 'Title' }, 'image' => { 'urn' => 'URN' } } };

Granted, I can't see any purpose at all in using it for logging...

In reply to Re^2: YAML for logs? by clinton
in thread YAML for logs? by blazar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.