[Chicago-talk] XML DTD validation
fire at dls.net
Thu Jun 18 05:03:57 PDT 2009
Dear Chicago PerlMongers,
I have been working with XML::Checker::Parser (part of libxml-enno)
and found that many of the tests are broken, and it probably could
use to be upgraded to using Test::More. I have fixed most of it, but
maybe I should be expending my efforts on a different perl package?
I know that Andy has worked extensively with XML so maybe he has
some opinion on how to validate XML DTDs, and whether it is worth
any effort at all. (I could be wasting my time)
Also I don't want to offend the author, and I have never really done
clean-up on a CPAN package before. I was hoping that someone
could give me pointers on how to do that correctly too.
Also, I just sat down and learned the perl Test packages today, so
I will probably have some questions about what is the preferred mode
to use these. It seems that this coder rolled his own, and in most cases
I can replace the test calls with Test::More ones, but I did have a
about lines 223 and 249 of t/chk_batch.t. It has this curious line:
local *XML::DOM::warning = \&append_str;
which produces this error during testing:
Subroutine XML::DOM::warning redefined at t/chk_batch.t line 223.
Subroutine XML::DOM::warning redefined at t/chk_batch.t line 249.
It is pretty lame, and there is probably a better way to do it, but
is better to override the warning routine? Just let it get called?
Here is the subroutine (so you don't have to look it up)
$error_str .= shift() . "\n";
Probably there is an accepted idiom to use for this purpose when
writing tests, and I would rather go with the flow than create my own
Thanks for your assistance.
fire at dls.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chicago-talk