Re: Frequency of test.pl
Steffen Mueller wrote: { name='no_test_pl', error=q{This distribution contains a file called 'test.pl' in its main distribution directory. This indicates that it uses the old style of creating test suites. Nowadays, tests belong into one or more *.t files in the t/ subdirectory.}, This doesn't really explain why test.pl is bad. It says its old but there's nothing wrong with old, if it works. The real problem is that test.pl is unparsed by make test and thus cannot be checked by automated testing. Try something like... This distribution uses 'test.pl' for its tests. The output of 'test.pl' is not parsed. When make test is run by automated installers (for example, the CPAN shell) your tests will always appear to have passed no matter what the output of 'test.pl'. Please rename 'test.pl' to a '*.t' file in the t/ directory (for example, t/basic.t). All of t/*.t will be run, and parsed, by make test.
Re: Frequency of test.pl
Hi again, Michael G Schwern schrieb: So making no_test_pl a kwalitee test is a good idea. of course, adding a mention in the docs helps, too. So I should have made it a patch. Sorry. I didn't have the svn sources. Hence: =item * has_test_pl And if people decide that this should be optional, add an is_extra = 1, into the hash ref of the last mail.
Re: Frequency of test.pl
Hi, Michael G Schwern schrieb: So making no_test_pl a kwalitee test is a good idea. So adding this to Module::CPANTS::Kwalitee::Files in the obvious place should do exactly that. Perhaps we should call it old_testing_scheme or so instead, but I'll go with your suggestion: { name='no_test_pl', error=q{This distribution contains a file called 'test.pl' in its main distribution directory. This indicates that it uses the old style of creating test suites. Nowadays, tests belong into one or more *.t files in the t/ subdirectory.}, remedy=q{Refactor the monolithic test.pl script into one or more t/*.t test scripts.}, code=sub { my $d=shift; return 0 if $d-{file_test_pl}; return 1; }, }, HTH, Steffen
Re: Frequency of test.pl
On 11/1/06, Michael G Schwern [EMAIL PROTECTED] wrote: This distribution uses 'test.pl' for its tests. The output of 'test.pl' is not parsed. When make test is run by automated installers (for example, the CPAN shell) your tests will always appear to have passed no matter what the output of 'test.pl'. Is that true when test.pl dies? Maybe it should say that if you must use test.pl it should die on test failure. Yves -- perl -Mre=debug -e /just|another|perl|hacker/
Re: Frequency of test.pl
Michael G Schwern schrieb: This doesn't really explain why test.pl is bad. [...] Agreed! This distribution uses 'test.pl' for its tests. The output of 'test.pl' is not parsed. When make test is run by automated installers (for example, the CPAN shell) your tests will always appear to have passed no matter what the output of 'test.pl'. Please rename 'test.pl' to a '*.t' file in the t/ directory (for example, t/basic.t). All of t/*.t will be run, and parsed, by make test. Much better! Steffen
Re: Frequency of test.pl
demerphq wrote: On 11/1/06, Michael G Schwern [EMAIL PROTECTED] wrote: This distribution uses 'test.pl' for its tests. The output of 'test.pl' is not parsed. When make test is run by automated installers (for example, the CPAN shell) your tests will always appear to have passed no matter what the output of 'test.pl'. Is that true when test.pl dies? Maybe it should say that if you must use test.pl it should die on test failure. Technically that is correct. However, 99% of the time folks are using test.pl because that's what h2xs gave them and not because they prefer it over t/*.t. Its not worth mentioning workarounds in a succinct explanation, there's little reason reason to put tests in test.pl.