in reply to Re: Including a 'test only' module in distribution
in thread Including a 'test only' module in distribution
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:
find( sub { return unless /^FLTest.pt$/; return if -f "FLTest.pm"; copy("FLTest.pt", "FLTest.pm") or die "Couldn't create FLTest.pm (some tests will fail): $!"; }, ".");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Including a 'test only' module in distribution
by tachyon (Chancellor) on Sep 26, 2001 at 01:15 UTC | |
|
Re: Re: Re: Including a 'test only' module in distribution
by Anonymous Monk on Sep 26, 2001 at 01:06 UTC |