On 21 Jan 2007, at 12:23, Ovid wrote:
I have a CPAN mirror that I'm planning to grep in it's entirety
looking for evidence of dependencies on Test::Harness::Straps|Point|
whatever.

That's a great start.  I assume you have a copy of Schwern's grep_cpan
script?

Didn't. Do now :)

http://www.schwern.org/~schwern/src/grep_cpan

My current plan for Test/Harness.pm itself is to keep the API the
same but printed (and possibly captured) output will be coming from
TAPx::Harness - so anything that relies on that will likely break.

Hmm, I was under the impression that a fair amount of code does rely on parsing the Test::Harness output. If that's the case, a good first pass is
to make an exact duplicate of TH and provide an API for gathering that
information rather than scraping.

OK, here's how I'm thinking at the moment. All up for debate of course.

TAPx::Harness::Compatible is our Test::Harness 3.0 in waiting

runtests()      will run tests as before but using TAPx::Harness so the
                output will be formatted differently.

execute_tests() will run tests using TAPx::Harness, output formatted
                differently, and will then synthesize the three
                hashes that execute_tests() currently returns.

Both of those will use a TAPx::Harness internally but not make it
available to the caller. I could extend their interface to make it
possible to supply a TAPx::Harness for them to use but I wonder whether
there's a need.

If the caller knows about TAPx::Harness and is interested in having
access to it then that implies that compatibility with Test::Harness has
ceased to be an issue. In that case you would presumably be calling the
new TAPx::Harness API directly.

If there's any code out there that gets intimate with
Test::Harness::Straps et al we're not easily going to be able to support
it with TAPx::Harness::Compatible.

  Of course, it also depends upon what
output information is being scraped. If it's only something simple like 'All
tests successful', then this is an easier task.

I presume anyone who wanted to know that currently would just be calling
T::H::execute_tests which returns three hashes that summarise the test
results.

--
Andy Armstrong, hexten.net

Reply via email to