On Thu, Feb 21, 2002 at 12:52:01PM +0000, Nicholas Clark wrote: > On Sun, Feb 17, 2002 at 02:00:06PM +0000, Mark Fowler wrote: > > On Sun, 17 Feb 2002, Mark Fowler wrote: > > > > > I'd really like to see that it still works on a system that > > > doesn't have Term::ANSIColor installed on it (it should turn colouring > > > into a no-op and skip tests, but I can't test that.) > > > > D'Oh! No it shouldn't. As color should work (just without colouring) on > > systems that don't have Term::ANSIColor installed then the tests shouldn't > > be skipped at all, they should be carried out to explicitly check that > > then still work without it. > > > > Code updated so that it should do just that. > > I think that if you have enough disk space you should be able to > build yourself a second perl install that doesn't have > Term::ANSIColor installed, by configuring perl to use a different > prefix and ensuring it doesn't have any of the "standard" places to > find libraries in INC.
Simpler thing to do would be to create t/lib/fake/Term/ANSIColor.pm which is something like: package Term::ANSIColor; die, die, die, die, die "Can't locate Term/ANSIColor.pm in \@INC\n"; and then when you want to simulate not having Term::ANSIColor in the tests you can do: unshift @INC, 't/lib/fake'; ... and any unshielded require/use of Term::ANSIColor will explode convincingly. -- Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/ Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One "Let's face it," said bearded Rusty Simmons, opening a can after the race. "This is a good excuse to drink some beer." At 10:30 in the morning? "Well, it's past noon in Dublin," said teammate Mike [Joseph] Schwern. "It's our duty." -- "Sure, and It's a Great Day for Irish Runners" Newsday, Sunday, March 20, 1988