After much longer than it *should* have taken me, I've finally gotten my
Test::* module onto CPAN (in fact, this is the second release, as the first
time around I bundled it on a machine that had an out-of-date EU::MM, so the
META.yml wasn't quite up to par... plus I'd fumbled the specification of
some of the pre-reqs).
I settled on the name "Test::Formats". At present, the module provides
Test::Formats and Test::Formats::XML. The latter has all the testing-hooks
for checking XML documents against DTDs, XML Schema descriptions and RelaxNG
schemas. In 0.11, for the heck of it, I also added simpler tests that can be
used to see if a doc is just well-formed (parses without errors), without
having to go through validation. I know that other modules do this, but I
figure if you've loaded T::F::XML, you already have XML::LibXML in memory so
there's no reason to make you load a completely separate new
test-dependency.

The Test::Formats module itself is an umbrella/loader class that just looks
at the import arguments and tries to load those that appear to be (what I
termed) "specialization" modules. T::F::XML is a specialization for XML, and
I plan to have one for YAML that at least front-ends Data::Rx (
http://search.cpan.org/dist/Data-Rx). Indeed, once I have that, and I or
someone convert the META.yml spec to an Rx schema, then CPANTS et al should
be able to implement validation tests for distros' META.yml files without
writing custom code.

At this stage, the testing suite for the module is, well, embarrassing.
Especially for a module that is itself in the Test::* namespace :-). But I
am working on that, as well as new feature-work. Sparse though my tests may
be, I do at least test/confirm the integration functionality that
Test::Formats provides. That means that when I have more than just "XML" to
offer, they can conceivably all be loaded at once via the top-level
loader. I invite/encourage folks to beat on it and find (and report!) any
bugs they find.

Lastly, a tip-o-the-hat to Ovid for planting the idea in my head. Sorry it
took so long to get here, but at least I (think I) put together a decent
framework around the basic XML tests so that it can be easily extended.

Randy
-- 
Randy J. Ray / [EMAIL PROTECTED]
Silicon Valley Scale Modelers: http://www.svsm.org
Sunnyvale, CA

Reply via email to