Geoffrey Young wrote: >>[ Just before sending this I notice Geoff has recommended something >>better, but I'll send this too as another WTDI. ] > > > cool :) > > I started to maintain Apache-Test skeletons, but I never quite got them up > to speed. give me a few days and I'll roll a tarball with a test-cover > target so that folks can have an entire working example of the way I would > do it.
as promised, here is a tarball that includes a 'test-cover' target. http://perl.apache.org/~geoff/Apache-Test-with-Devel-Cover.tar.gz it's made a little more complex than it needs to be because of version restrictions: 'test-cover' requires the (yet unreleased) Apache-Test 1.14 as well as the (yet unreleased) Devel::Cover 0.48. if you remove that logic the requirements to get Devel::Cover working well with mod_perl are pretty minimal. in a real-life deployment my configuration is almost identical, save lots more +inc entries and specific pointers to where cover_db ought to live. and, as paul pointed out, when you invoke Devel::Cover like this you get coverage for _both_ regular perl modules tested by *.t files, as well as your mod_perl handlers, making it really easy to mix apache and non-apache based tests in a single suite. anyway, if people have trouble with the tarball just let me know and I'll tweak it as required. if you are unfamiliar with Apache-Test, check out the README contained within the tarball itself - it has just about everything you need to know, including pointers to more verbose documentation. HTH --Geoff
