Hi all, Please read and comment on this. Many folks ignore these emails, but we're talking about the new version of TAP here! Feedback is important.
Schwern: you're specifically copied on this as you maintain Test::Simple. If we get this working, how would you feel about a patch to Test::Simple that makes this automatically incorporated into new test suites which upgrade Test::Simple? The obvious problem is that this would create a dependency on TAP::Diagnostics (which I'm hoping will have no non-core dependencies and work on Perl back to 5.005.) It could also be included with Test::Simple as Test::Diagnostics, if you prefer. Here's what I currently have, based on thoughts from Adrian Howard and Schwern, Andy Armstrong and my own imagination: A stub module named "TAP::Diagnostics". I currently have three poorly named functions. is_new_tap() The author of a test module can call this to find out if new-style TAP diagnostics are supported. This is done internally by checking the TAP_VERSION environment variable. This might get internalized in the following two functions (though it shouldn't matter if indented YAML is encountered by older TAP parsers. It just means that running tests in verbose mode will spit out more info). diagnostic( { found => $found, # can be stand-alone wanted => $wanted, # must always be present with 'found' display => $display, # optional human-readable presentation extra => $extra, # anything else. Useful for custom harnesses meta => 0, } ); The 'meta' information defaults to true but can be suppressed. Currently this allows the line number and filename to be inserted into the TAP. meta() This spits out meta informaton. Currently looks like this: --- executable: perl inc: - lib - t/lib - /System/Library/Perl/5.8.6/darwin-thread-multi-2level - /System/Library/Perl/5.8.6 - /Library/Perl/5.8.6/darwin-thread-multi-2level - /Library/Perl/5.8.6 - /Library/Perl - /Network/Library/Perl/5.8.6/darwin-thread-multi-2level - /Network/Library/Perl/5.8.6 - /Network/Library/Perl - /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level - /System/Library/Perl/Extras/5.8.6 - /Library/Perl/5.8.1 - . os: darwin perl: 5.008006 tap_version: 13 ... Some of that is Perl-specific and therefore is wrong. However, it can be very useful for debugging information. Thoughts? Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Perl and CGI - http://users.easystreet.com/ovid/cgi_course/ Personal blog - http://publius-ovidius.livejournal.com/ Tech blog - http://use.perl.org/~Ovid/journal/