Re: [Module-build-general] [PATCH t/runthrough.t] distdir needs to see M::B
Status: Beta
Brought to you by:
kwilliams
From: Ken W. <ke...@ma...> - 2002-12-13 02:43:47
|
I thought about this one some more, and I wrote another confused message about it, and then I realized that you were quite right in your original patch (modulo the disttest/distdir thingy). I also have to set @INC with an absolute path (instead of Test::Harness's "blib/lib") so that the 'test' action sees the right M::B. I'll apply it when I'm back online. -Ken On Tuesday, December 10, 2002, at 11:42 AM, Ken Williams wrote: > Good spot. It's disttest though, not distdir, and this doesn't > actually seem to fix the problem. The BEGIN block in the generated > Build script doesn't contain the directory it needs to. > > This is kind of a tough one to make a test for. > > > On Monday, December 9, 2002, at 07:51 PM, Michael G Schwern wrote: > >> When t/runthrough.t runs a distdir perl Build.PL is run. It can't see >> the >> uninstalled Module::Build, the child process doesn't inherit its >> parent's >> @INC. Simplest way around this is to set PERL5LIB. >> >> This patch fixes: >> >> --- t/runthrough.t 27 Nov 2002 02:15:18 -0000 1.4 >> +++ t/runthrough.t 9 Dec 2002 08:46:40 -0000 >> @@ -1,15 +1,17 @@ >> -######################### We start with some black magic to print on >> failure. >> +#!/usr/bin/perl -w >> >> use Test; >> BEGIN { plan tests => 10 } >> use Module::Build; >> +use Cwd; >> use File::Spec; >> use File::Path; >> my $HAVE_YAML = eval {require YAML; 1}; >> >> ok(1); >> >> -######################### End of black magic. >> +# So distdir can see the uninstalled Module::Build. >> +$ENV{PERL5LIB} = File::Spec->rel2abs(File::Spec->catdir('blib', >> 'lib')); >> >> my $goto = File::Spec->catdir( Module::Build->cwd, 't', 'Sample' ); >> chdir $goto or die "can't chdir to $goto: $!"; >> >> >> >> -- >> >> Michael G. Schwern <sc...@po...> >> http://www.pobox.com/~schwern/ >> Perl Quality Assurance <pe...@pe...> Kwalitee Is Job >> One >> And God was pleased. >> And Dog was happy and wagged his tail. >> And Adam was greatly improved. >> And Cat did not care one way or the other. >> -- http://www.catsarefrommars.com/creationist.htm >> >> >> ------------------------------------------------------- >> This sf.net email is sponsored by:ThinkGeek >> Welcome to geek heaven. >> http://thinkgeek.com/sf >> _______________________________________________ >> Module-build-general mailing list >> Mod...@li... >> https://lists.sourceforge.net/lists/listinfo/module-build-general >> > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Module-build-general mailing list > Mod...@li... > https://lists.sourceforge.net/lists/listinfo/module-build-general |