Hi! Sorry for the late response - I've been distracted.
On Wednesday 01 November 2006 22:13, Michael G Schwern wrote: > Shlomi Fish wrote: > > Hi all! > > > > See http://xrl.us/sw5o for a recipe for integrating "make runtest" and > > "make distruntest" targets into a Makefile.PL-generated Makefile that > > makes use of Test::Manifest. > > > > I needed that when working on XML::RSS, so I wrote it. > > What has me scratching my head here is why you're hacking in a new target > for Test::Run rather than just overriding the test target using the much > cleaner test_via_harness(). Either the author wants to use Test::Run or > they don't. If the intention is for your own personal use while hacking > other's modules, it seems much easier to simply have a prove command-line > equivalent for running tests with Test::Run and Test::Manifest then to have > to hack up each author's Makefile.PL. Well, my original motivation was to have "make test" still use Test::Harness so one will not need to use Test::Run to run the tests. I don't want to impose Test::Run. Now instead, those that have Test::Run installed will be able to say "make runtest" or "make distruntest" (which is harder to implement as a command line utility.) I already have "runprove" which is a Test-Run-based command line utility like "prove". However, running "runprove -l t/*.t" or in our case, something using Test::Manifest, is more error prone than typing "make runtest" and "make distruntest" would be even harder to get right this way. Over-riding "make test" and "make disttest" would not be a good idea, because it will necessisate Test::Run in order to test the module. > > > As for the implementation, here's some notes to avoid MakeMaker land mines: > > Your "perl" is hard coded. You should be using $(PERLRUNINST) so that the > tests run with the same perl used to run Makefile.PL. Thanks, I'll correct it. > > > You probably want to stash the bulk of the command line code off in a > function somewhere like ExtUtils::Command::MM::test_harness() and > Test::Manifest::run_t_manifest(). Long command lines mean portability > problems. > Yes, that would be a good idea. > > This is not how you override methods in MakeMaker. Its not backwards > compatible and it pokes at the guts which are likely to move. > > sub ExtUtils::MM_Any::test_via_harness { > Well, this function was added to the XML::RSS Makefile.PL before I modified it to add Test::Run support. I guess it would still be a good idea to fix it. Regards, Shlomi Fish --------------------------------------------------------------------- Shlomi Fish [EMAIL PROTECTED] Homepage: http://www.shlomifish.org/ Chuck Norris wrote a complete Perl 6 implementation in a day but then destroyed all evidence with his bare hands, so no one will know his secrets.