Andy Armstrong <a...@hexten.net> writes:
> On 10 Jun 2009, at 09:33, Gabor Szabo wrote:
>> So now that I am switching reporting to TAP how do I log the raw data?
>
>
> This is the primary use case for TAP diagnostic
> blocks. Unfortunately I don't think any TAP emitter currently
> supports TAP diagnostics :)
>
> Test::Harness does process YAML blocks though - so if you can figure
> out how to emit them you'll be good to go.

I do this for a while. Convert data into YAML, eg. from XML, indent
manually (there were no nested TAP at that time), and just print it
out manually. Chaining XML::Simple with some YAML module might give
you a quick start.

 ok 1 foo
 ok 2 bar
   ---
   some:
     hot:
       stuff:
         foo: bar
         baz: zig zag
       other_stuff:
         affe: 23
         zomtec: 42
   ...
 ok 3 the saga continues

I later evaluate it using TAP::DOM which implicitely connects the YAML
to the test line before ("ok 2 bar" in this case).

I did never care for reserved key names as once discussed, because I
strongly believe they are in the same user design space as the test
descriptions.

Having the indenting done by the YAMLish::Writer or Test::Builder
would be nice, though, because simply inserting some space might only
fork for trivial key:value content.

Kind regards,
Steffen 
-- 
Steffen Schwigon <s...@renormalist.net>
Dresden Perl Mongers <http://dresden-pm.org/>
Deutscher Perl-Workshop <http://www.perl-workshop.de/>

Reply via email to