[Module-build-general] [PATCH t/runthrough.t] distdir needs to see M::B
Status: Beta
Brought to you by:
kwilliams
From: Michael G S. <sc...@po...> - 2002-12-09 08:52:53
|
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 |