Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

TorgoX (1933)

TorgoX
  sburkeNO@SPAMcpan.org
http://search.cpan.org/~sburke/

"Il est beau comme la retractilité des serres des oiseaux rapaces [...] et surtout, comme la rencontre fortuite sur une table de dissection d'une machine à coudre et d'un parapluie !" -- Lautréamont

Journal of TorgoX (1933)

Tuesday February 19, 2002
11:57 AM

Testes, testes, one, two... three?

[ #2958 ]
Gisle Aas is a superstar. He always surprises me with his good ideas, which are almost always cleverly simple.

If you do single module hacks then it is popular to integrate its tests in the module with something like:

package Foo;

# ...

unless (caller) {
    # test me
    ...
}

1;

Makes more sense to me to extract a test script from this kind of setup instead of from a POD section. During development you test by 'perl Foo.pm' and when you are happy and want to upload it you 'makepmdist' it.

I'm not sure how to integrate this with the whole t/test.t system tho. I don't see how to have test code that would actually be able to say "use Foo;". So , for example, you couldn't really test that Foo was exporting what its docs say it will export.

Ideas, anyone?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.