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-10 00:42:11
|
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. -Ken 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 > |