From: Michael G. Schwern Date: Tue, 18 Dec 2001 00:40:38 +0000 (-0500) Subject: Making it somewhat more portable X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=19e86e2fbc37971c06cbb6405f0c209e2d10f3cf;p=p5sagit%2Fp5-mst-13.2.git Making it somewhat more portable Message-ID: <20011218054038.GB4362@blackrider> p4raw-id: //depot/perl@13753 --- diff --git a/lib/ExtUtils/Installed.pm b/lib/ExtUtils/Installed.pm index a0eeaf4..bb744b0 100644 --- a/lib/ExtUtils/Installed.pm +++ b/lib/ExtUtils/Installed.pm @@ -85,7 +85,7 @@ if ($DOSISH) # Read the core packlist $self->{Perl}{packlist} = - ExtUtils::Packlist->new("$installarchlib/.packlist"); + ExtUtils::Packlist->new( File::Spec->catfile($installarchlib, '.packlist') ); $self->{Perl}{version} = $Config{version}; # Read the module packlists diff --git a/lib/ExtUtils/t/Installed.t b/lib/ExtUtils/t/Installed.t index f6bd21b..ca3e9af 100644 --- a/lib/ExtUtils/t/Installed.t +++ b/lib/ExtUtils/t/Installed.t @@ -88,13 +88,15 @@ SKIP: { # avoid warning and death by localizing glob local *ExtUtils::Installed::Config; + my $fake_mod_dir = File::Spec->catdir(cwd(), 'auto', 'FakeMod'); %ExtUtils::Installed::Config = ( - archlib => cwd(), - sitearch => cwd() . 'auto/FakeMod', + archlib => cwd(), + installarchlib => cwd(), + sitearch => $fake_mod_dir, ); # necessary to fool new() - push @INC, cwd() . '/auto/FakeMod'; + push @INC, $fake_mod_dir; my $realei = ExtUtils::Installed->new(); ok( exists $realei->{FakeMod}, 'new() should find modules with .packlists'); @@ -111,9 +113,9 @@ is( join(' ', $ei->modules()), 'abc def ghi', # files $ei->{goodmod} = { packlist => { - $Config{installman1dir} . '/foo' => 1, - $Config{installman3dir} . '/bar' => 1, - $Config{prefix} . '/foobar' => 1, + File::Spec->catdir($Config{installman1dir}, 'foo') => 1, + File::Spec->catdir($Config{installman3dir}, 'bar') => 1, + File::Spec->catdir($Config{prefix}, 'foobar') => 1, foobaz => 1, }, };