On Wednesday 23 Dec 2009 15:42:01 sawyer x wrote:
> On Wed, Dec 23, 2009 at 1:30 PM, Shlomi Fish <[email protected]> wrote:
> > What I normally do is put it under t/lib [...]
> 
> Module::Starter is an example of this. I believe Module::Build is, too.
> 

Well, I am to blame for the t/lib modules in Module::Starter , as it was me 
who added this test code there. I used the t/lib paradigm in several other 
modules before (not Module::Build though, which I didn't do a lot of extensive 
work on, yet), but think this convention predates me. In any case, it can be 
"t/test-support-lib" or whatever you want - M::B/EU::MM/etc. won't complain, 
and won't install anything that's not under lib/ [1]

For HTML-Widgets-NavMenu I used to have some testing support code under 
"$dist/HTML/" (instead of "$dist/t/lib/HTML") but I recently converted away 
from it.

> > This is cleaner than calling the module itself "t::", as modules that
> > start with a lowercase letter should be pragmata.
> 
> "cleaner" +1.
> 

Indeed. +1 here too. Please don't do "use t::lib::MyModule::Support;"

Regards,

        Shlomi Fish

[1] - Unless you have some modules in the top-level of the directory like 
putting Bar.pm in the top-level for Foo::Bar. But this is an evil relic of 
ancient Perl modules and should not be used any more.

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
The Case for File Swapping - http://shlom.in/file-swap

Bzr is slower than Subversion in combination with Sourceforge. 
( By: http://dazjorz.com/ )

Reply via email to