Re: masking installed versions when running tests

2009-05-12 Thread David Cantrell
On Mon, May 11, 2009 at 03:13:14PM -0700, Jonathan Swartz wrote: > >But really the simplest thing is to get into the habit of running > >tests from the source directory and no where else. > Ok, fair enough. :) I didn't know whether I could legitimately make > that assumption for all the automa

Re: masking installed versions when running tests

2009-05-12 Thread David Cantrell
On Mon, May 11, 2009 at 01:25:14PM -0700, Jonathan Swartz wrote: > Ok. Thanks for the mention of Devel::Hide. There is also > Test::Without::Module and Module::Mask, which all look pretty similar. > > But I still have two problems with using any of these directly: > 1) I have to specify exactly

Re: masking installed versions when running tests

2009-05-11 Thread Jonathan Swartz
Jonathan Swartz wrote: 2) I have to compute the right exception paths. Doing "use lib qw(blib/lib blib/arch)" as you suggest would only work if the tests were run from the main directory. e.g. If I'm in the t/ directory and do "perl -I../lib foo.t", as I do sometimes, it ought to work as well.

Re: masking installed versions when running tests

2009-05-11 Thread Michael G Schwern
Jonathan Swartz wrote: > 2) I have to compute the right exception paths. Doing "use lib > qw(blib/lib blib/arch)" as you suggest would only work if the tests were > run from the main directory. e.g. If I'm in the t/ directory and do > "perl -I../lib foo.t", as I do sometimes, it ought to work as we

Re: masking installed versions when running tests

2009-05-11 Thread Jonathan Swartz
On Wed, May 06, 2009 at 12:15:38PM -0400, David Golden wrote: On Wed, May 6, 2009 at 12:05 PM, David Cantrell > wrote: That's true, but this isn't just about testing libs - it's any lib I might delete from the distribution. You want Devel::Hide. I think the original question was about catchin

Re: masking installed versions when running tests

2009-05-06 Thread David Cantrell
On Wed, May 06, 2009 at 12:15:38PM -0400, David Golden wrote: > On Wed, May 6, 2009 at 12:05 PM, David Cantrell wrote: > >> That's true, but this isn't just about testing libs - it's any lib I > >> might delete from the distribution. > > You want Devel::Hide. > I think the original question was ab

Re: masking installed versions when running tests

2009-05-06 Thread David Golden
On Wed, May 6, 2009 at 12:05 PM, David Cantrell wrote: >> That's true, but this isn't just about testing libs - it's any lib I >> might delete from the distribution. > > You want Devel::Hide. I think the original question was about catching a module deleted by mistake -- otherwise, Devel::Hide ro

Re: masking installed versions when running tests

2009-05-06 Thread David Cantrell
On Wed, May 06, 2009 at 08:44:00AM -0700, Jonathan Swartz wrote: > From: Michael Peters > > Jonathan Swartz wrote: > > > In the latest version I deleted a necessary module, CHI/t/Multilevel.pm, > > > from the distribution, but "make test" still succeeded because > > > CHI/t/Multilevel.pm was ins

Re: masking installed versions when running tests

2009-05-06 Thread Jonathan Swartz
That's true, but this isn't just about testing libs - it's any lib I might delete from the distribution. -Original Message- From: Michael Peters Date: Wednesday, May 6, 2009 6:22 am Subject: Re: masking installed versions when running tests To: Jonathan Swartz CC: per

Re: masking installed versions when running tests

2009-05-06 Thread Michael Peters
Jonathan Swartz wrote: In the latest version I deleted a necessary module, CHI/t/Multilevel.pm, from the distribution, but "make test" still succeeded because CHI/t/Multilevel.pm was installed in /usr/local. You could also put your testing libs in t/lib instead of CHI/t that way they are nev

Re: masking installed versions when running tests

2009-05-06 Thread David Golden
On Tue, May 5, 2009 at 7:44 PM, Jonathan Swartz wrote: > One solution, I guess, is to use a fresh install of Perl that contains just > the requirements for CHI. But I'd need one of these for each CPAN > distribution I'm working on! You only need one fresh perl. Set CPAN not to install build_requ