>   test => { TESTS => join ' ', map { glob } qw( t/*/*.t t/*/*/*.t ) },

but slashes aren't portable, right?  I don't think you can get rid of
File::Spec.


> Also, I agree that the use-Test-Plan-after-Test-More caveat is icky.

well, it's a caveat, not a requirement :)

the way it works now is that either you load Test::More first and subvert it
with Test::Plan (as I show) or you load Test::Plan first, which successfully
takes over main::plan, then you load Test::More and boom, Test::More
complains about redefining symbols.  which is quite normal, actually, when
using modules with like-named functions and Exporter - nothing new in
perl-land.  the difference here is that Test::Plan provides some sugar so
you don't need to worry about doing that, provided you load it last.

> How about modifying Test::Plan::import() so that it (a) checks to see
> if Test::More *has* already been loaded or (b) checks if a plan()
> subroutine is already defined in the namespace that the method is
> exporting to.

hmm, maybe I'm misunderstanding but neither of those situations are helpful
- Test::Plan::plan() needs to be the one and only plan() for people to use
it as a drop-in replacement - I explicitly don't want to bail if either a)
or b) is true, I want the main::plan() namespace no matter what.

fwiw, I'm not trying to be defensive about this, and I appreciate the
feedback.  I was only trying to provide an elegant solution so that test
writers didn't need to worry so much about competing function names.

--Geoff

Reply via email to