In article
<[EMAIL PROTECTED]>, Randy J.
Ray <[EMAIL PROTECTED]> wrote:


> 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.

What is Test::Formats supposed to do? I know you described the XML use
case, but that doesn't seem like you're testing a format, or that
format is too broad a term. Maybe it's really Test::StructuredText?
Maybe not; would this handle thigns like checking the structure of a
binary data file?

I guess it gets down to semantics, but it sounds odd to me to call XML
or YAML a format. Your examples sound like you are validating against a
schema, which often doesn't care about the format (e.g. whitespace,
etc).

Is there a way to hide more of the magic though? Why import anything
(especially with a non-standard import list)? Perhaps you can
auto-detect the source type and dispatch it with hidden magic or with
an optional schema. How about calls like:

   schema_validates_ok( $source, [$schema] );

   schema_validates_ok( $source, xml => $schema );

   schema_validates_ok( $source, yaml => 1.0 );

   schema_validates_ok( $source, 'quoted-csv' );

That way, it really is an umbrella class rather than just a module
loader.

Despite the name, it sounds like a cool module if it does what I think
it does. :)

Reply via email to