> or even better, since you can import plan() anyway, just use a forward > declaration: > > use subs qw(plan); > > and then you don't need any new vars or mess with aliases. it'll be just > there. which will make your code much simpler:
ok, I'll play with all of that. > and one more nit -- The import() function may be called more than once, > and every time it'll try to reimport all these symbols. So you probably > want to have a flag so that you import them only once. hmm, I guess so. but I haven't seen other import() methods bothering with that. > > Also what happens if -withtestmore is not the first argument to import()? hmm, I dunno. I just copied code from ModPerl::Const :) > Regarding this comment: > > +C<-withtestmore> tells I<Apache::Test> to use the I<Test::More> framework > +instead of the I<Test.pm> framework behind the scenes. Note that you are > +not required to C<use Test::More> yourself with the C<-withtestmore> > option. > > What happens if I want to use functions from T-M, will this work? > > use Apache::Test qw(-withtestmore); > is ($foo, $bar); > > I guess not. nope, that works just fine (see the test tarball :). I wanted things to be the same as they were with Test.pm - use Apache::Test and automatically get all the Test.pm or Test::More stuff you were used to. in the case of Test::More, though, it's just a lot more stuff :) > Usually you want Test::More for its functionality, not > ok/plan/skip. So in 99.9% cases you will want to say: > > use Apache::Test qw(-withtestmore); > use Test::More; > is ($foo, $bar); > > no? > > > --------- > > > + Test::Builder->failure_output(\*STDOUT); > > I think Test.pm has it set to STDERR: > > Test.pm:33: $TESTERR = *STDERR{IO}; > > so we probably want to keep things consistent, no? ok, I guess you're right. I didn't have it set at first and only saw stuff in the error_log and thought it wasn't right. maybe Test::More is putting more/different stuff in STDERR? I'm not exactly sure, which is why I put that the interface was experimental in the comments - I have a feeling that it's going to take some usage and tweaking before we get it all right, but for the moment it's usable which is more than we had last week :) --Geoff