Subject: | Makefile.PL WriteMakefile opts TESTS needs glob expansion |
I will discuss the problem, and then the fix.
On my Windows/Activestate perl 5.8.8 machine, I could not get past the
tests due to errors. I kept getting
t/*.............t/*.t does not exist
t/vmethods/*....t/vmethods/*.t does not exist
The offending lines of Makefile.PL are
'test' => {
TESTS => 't/*.t t/vmethods/*.t',
The fix is to change the above two lines to this:
'test' => {
TESTS => join ' ', map { glob } qw( t/*.t t/vmethods/*.t ),
The reason for the need for the fix is, according to the book "Perl
Testing: A Developer's Notebook", at the end of section 4.7. Bundling
Tests with Modules (discussing glob expansion),
this is necessary because WriteMakefile( ) will
not automatically expand the patterns when
used with ActiveState Perl on windows.
Thanks