develooper Front page | perl.qa | Postings from July 2009

Re: Test module for tests in Perl module distro

Thread Previous
From:
Buddy Burden
Date:
July 5, 2009 19:54
Subject:
Re: Test module for tests in Perl module distro
Message ID:
a5daa5b60907051954p3cce5bbex2b4b78fdf2c97d84@mail.gmail.com
David,

> (3) either of the above but "use t::MyTest" rather than changing @INC
> with "use lib..."
>
> I don't think any one is much better than the others.  I tend to like
> the "t::MyTest" approach from a readability standpoint because it's
> clear within the *.t file that this is a test library and it's clear
> where to locate it.

You know, that's one of the first solutions I thought of, but I was
afraid it was too much of a hack.  But now that I know that other
folks do it that way, I'll go for it. :)

The only downside I see is that once I do that, those test files can't
be run from inside the t/ dir itself.  But, now that I think about it,
that's probably true for other reasons as well (e.g. prove -l wouldn't
work from inside t/).

Okay, just some things I'm trying to work through as I (finally)
convert all my homegrown tests to standard TAPpy things and get some
stuff ready for CPAN.  I'll probably have loads more questions later.
Thanx!

            -- Buddy

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About