[Israel.pm] Testing your CPAN Module

Shlomo Yona shlomo at cs.haifa.ac.il
Thu Jul 1 06:32:01 PDT 2004


I'd like to add tests to some modules I'm maintaining.

What easy to use tools are available to construct tests in

Here are some examples for things I'd like to test:
* That all dependencies are available (how would I define them at the first place? How can I make sure they exist?)
* How can I change the behaviour of the test suite depending on available prerequisites?
* How do I "test my tests"?

Take for example, the module Lingua::HE::Sentence, which
I'll demonstrate today at the lecture. The module takes a
UTF-8 encoded Hebrew text and segments it into sentences
according to some heuristics. So, I figure that the
following things are something worth testing:
* Perl version above some predetermined number
* take a text file (which is part of the distribution) and
have the module segment it and then check for each special
case if the segmentation was correct.

What is the standard way of doing this?

There seem to be quite a lot of testing modules out there.
Which one is good for which task?


Shlomo Yona
shlomo at cs.haifa.ac.il

More information about the Perl mailing list