> I understand that your patch proposes to introduce: > > use Apache::TestUtil qw(:testmore); > use Test::More; > > correct?
Apache::Test, not TestUtil, but yes. > > There are two things: > > 1. :tesmore imports has nothing to do with Test::More, so that tag is > very confusing. How about fixing import() instead and use a special > optional first argument: > > use Apache::TestUtil '-withtestmore'; > use Test::More; > > or similar? testmore, withtestmore, whatever you want to call it. as for the '-foo' versus 'foo' stuff one is more standard than the other but however you prefer is fine. > > 2. Apache::TestUtil's ok, skip and plan aren't compatible with > Test::More's one, so I'm not sure what do you achieve with this patch. what you get is all of Apache::Test except ok, skip, and plan. those are the methods that get redefined warnings and cause problems when you try to mix the two modules (especially with fatal warnings). in particular Test::More requires you to use Test::More::plan() or else each of its methods (say, is_deeply()) complains about not having called Test::More::plan(). > > IMHO, users wanting to only use Apache::TestUtil's certain functions > while using Test::More should simply import only those functions. > Problem solved. for the most part I (and others I have talked to) want to use just about all the methods from each: all the have_* functions from Apache::Test as well as the like() functions from Test::More. if you wanted that, you would need to hand-type 17 import methods from Apache::Test. this eliminates the need for that and allows for a more idiomatic usage. simply use Apache::TestUtil qw(:testmore); use Test::More; gives you everything from Apache::Test except those methods that collide with Test::More. you are then free to use Apache::TestUtil functions in your tests while keeping with Test::More's familar plan() and ok() interface. but whatever. I'm just trying to make userspace easier. --Geoff