It seems t/lib is a common place to put modules used to support testing,
how about having Test::More push that path to @INC if -d 't/lib' ? It would
save me one , possibly two annoying lines of code in every .t file I write.
With an import tag, ':automiport' or something, it could perhaps require
a
http://grep.cpan.me/?q=use+lib+%28%27|%22|q.%2B%3F%29t%2Flib - use lib
('|"|q.+?)t/lib - 948 distributions. Not all use Test::More, but
probably most.
But I would still expect a tag for pushing 't/lib' to @INC, not for
Test::More to push to @INC silently, on the grounds that it's easier
to add to
* Torbjørn Lindahl [2014-01-30T19:59:04]
> It seems t/lib is a common place to put modules used to support testing,
> how about having Test::More push that path to @INC if -d 't/lib' ? It would
I suggest this alternative:
use t::lib::MyPackage;
;)
--
rjbs
signature.asc
Description: Digita
On Fri, Jan 31, 2014 at 1:59 AM, Torbjørn Lindahl <
torbjorn.lind...@gmail.com> wrote:
>
> It seems t/lib is a common place to put modules used to support testing,
> how about having Test::More push that path to @INC if -d 't/lib' ? It would
> save me one , possibly two annoying lines of code in e
> use t::lib::MyPackage;
Nice tip!
Searching on "use t::lib" led me to PPI which has both lib/PPI.pm and
t/lib/PPI.pm - I suspect that they're not interchangeable and that
trying to add t/lib to @INC would break its tests.
Daniel
On 30 January 2014 22:25, Leon Timmermans wrote:
> On Fri, Jan 3