develooper Front page | perl.perl5.porters | Postings from March 2013

Re: What to do about t/lib?

Thread Previous
Aristotle Pagaltzis
March 10, 2013 08:28
Re: What to do about t/lib?
Message ID:
* James E Keenan <> [2013-01-19 15:40]:
> Would it be possible to develop a roadmap for moving these files to
> better locations?

Seems to me the question of what to do about ./t/lib/ entirely depends
on how tests are to be supplied for stuff in ./lib/ – and as far as
I can see, there is no other proper place for tests that deal with code
within ./lib/. (Curiously, there *is* ./lib/feature/unicode_strings.t –
but I have doubts that this is an approach to be emulated.)

I wonder if it would be a good answer to do something along the lines of
`mkdir core && mv lib core && mv t/lib core/t` so that we get a separate
CPANish structure for the core modules, in which tests live next to the
modules. (The choice of `core` here is merely to avoid `lib/lib`… and
presumably it would make the necessary refactoring easier by causing
things that expect `./lib` to crash more loudly than if they find one
whose content defies their expectations.)

(Hallucinating this idea to its logical conclusion yields a new `./perl`
directory to house the sources and tests of just the `perl` binary…
which does seem like it might make the top-level directory of the source
tree quite a lot less messy/intimidating/impenetrable-*seeming*, since
there would be mostly documentation and some housekeeping scripts left
there. I have absolutely no clue if this is in fact a good idea or worth
the bother.)

Aristotle Pagaltzis // <>

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About