Gabor Szabo wrote:
> Anyway here is another thing that I found.
> The test script fetches a few rows from a database and prints out a
> nicely formatted
> table of the values using high quality ascii art:
> 
> 1  |  3  | foo
> 1  |  7  | bar
> 
> I can just print the array holding this using explain \...@data but that
> will lead to
> an uprising. The people who need to see this are Java and Matlab programmers.
> Any other YAML like output will still be inferior to that nicely
> formatted table but I hope
> I'll be able to hook up some formater to display that nicely.

The proposed "display" field is for just this purpose.  It suggests to the TAP
parser how to display the diagnostic data.

  display: |
    1  |  3  | foo
    1  |  7  | bar

I don't know if TAP::Parser supports that, but there it is.  You can also pick
it out yourself as someone else suggested.  Also you'll note the raw YAML
looks pretty good so you can really just output it with any old key and people
can read it raw.

Getting a YAML dumper to dump in that format is another story.  You can get
YAML.pm to do it for multi-line scalars by setting $YAML::UseBlock = 1


-- 
emacs -- THAT'S NO EDITOR... IT'S AN OPERATING SYSTEM!

Reply via email to