Welcome to the Monastery | |
PerlMonks |
Re: Re: Including a 'test only' module in distributionby runrig (Abbot) |
on Sep 25, 2001 at 23:38 UTC ( [id://114644]=note: print w/replies, xml ) | Need Help?? |
The test suite itself is not a module. One of the tests (well, two actually) use a module that inherits from the main module and exists only to test a certain feature of subclassing the main module. And I generated the whole thing with h2xs, and I deleted test.pl and put several test scripts in a 't' subdirectory as per the docs, and my 'test' module is buried in the 't' directory and gets found via a 'use lib' and statement in the relevant test scripts. Sorry if I was unclear... Update:The test scripts don't actually explicitly use the test module themselves, but the module gets use'd from within the main module via arguments in the import list or the constructor method of the main module (and this whole process is what I'm testing), so the test module needs to be a ".pm" file and the path to it needs to get into @INC. I don't like the way I currently have it with the test scripts themselves renaming the file, so I've lately decided to put 'use lib' statements in the test scripts, and put this after the WriteMakeFile() in Makefile.PL:
In Section
Seekers of Perl Wisdom
|
|