Re: Test module for tests in Perl module distro

2009-07-10 Thread Mark Morgan
On Tue, Jul 7, 2009 at 9:21 PM, Michael G Schwernschw...@pobox.com wrote: Mark Morgan wrote: [1] Test::Class is my preferred testing package for work; I don't use it for stuff destined for CPAN due to adding an extra dependancy. *sigh* Your CPAN modules already depend on things like Moose

Re: Test module for tests in Perl module distro

2009-07-10 Thread Ovid
- Original Message From: Mark Morgan makk...@gmail.com [1] Test::Class is my preferred testing package for work; I don't use it for stuff destined for CPAN due to adding an extra dependancy. *sigh* Your CPAN modules already depend on things like Moose and Hook::LexWrap and

Re: Test module for tests in Perl module distro

2009-07-07 Thread Mark Morgan
On Tue, Jul 7, 2009 at 3:15 AM, Michael G Schwernschw...@pobox.com wrote: use lib 't/lib'; chdir 't'; require Some::Module::In::t::lib; lib.pm does not make the directory absolute, so it leaves your program vulnerable to the above problem.  Its rare you'd have to require instead of use,

Re: Test module for tests in Perl module distro

2009-07-07 Thread Michael G Schwern
Mark Morgan wrote: [1] Test::Class is my preferred testing package for work; I don't use it for stuff destined for CPAN due to adding an extra dependancy. *sigh* Your CPAN modules already depend on things like Moose and Hook::LexWrap and XML::Parser. Leaving out Test::Class at that point is,

Re: Test module for tests in Perl module distro

2009-07-06 Thread Michael G Schwern
David Golden wrote: On Sun, Jul 5, 2009 at 9:40 PM, Buddy Burdenbarefootco...@gmail.com wrote: Let's say I have some common functions that I want available to all my .t files. So I've created a module that all the .t files can include. But where do I put it? I don't want to put it in lib/

Re: Test module for tests in Perl module distro

2009-07-06 Thread Shaun Fryer
Hi Michael, et al, Personally, unless I have a very complicated (and therefore unusual) test setup, simply putting .pm files directly in t/ works just fine. Then a simple use lib './t' does the trick. `prove`, `make test` and even Test::Harness::run_tests(glob 't/*.t') ignore anything but .t

Re: Test module for tests in Perl module distro

2009-07-06 Thread Michael G Schwern
Shaun Fryer wrote: Personally, unless I have a very complicated (and therefore unusual) test setup, simply putting .pm files directly in t/ works just fine. Then a simple use lib './t' does the trick. `prove`, `make test` and even Test::Harness::run_tests(glob 't/*.t') ignore anything but .t

Re: Test module for tests in Perl module distro

2009-07-06 Thread Michael G Schwern
Michael G Schwern wrote: Here it is much simpler, and going onto the front of @INC as it should. use File::Spec; BEGIN { unshift @INC, map { File::Spec-rel2abs($_) } t/lib; } If I had to write all that code in every test I'd strangle myself. Fortunately there's lib::abs which I'd

Test module for tests in Perl module distro

2009-07-05 Thread Buddy Burden
Guys, Let's say I have some common functions that I want available to all my .t files. So I've created a module that all the .t files can include. But where do I put it? I don't want to put it in lib/ because I don't want it to get installed, right? But when I put it in t/, make test can't

Re: Test module for tests in Perl module distro

2009-07-05 Thread David Golden
On Sun, Jul 5, 2009 at 9:40 PM, Buddy Burdenbarefootco...@gmail.com wrote: Let's say I have some common functions that I want available to all my .t files.  So I've created a module that all the .t files can include.  But where do I put it?  I don't want to put it in lib/ because I don't want