From 19e86e2fbc37971c06cbb6405f0c209e2d10f3cf Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Mon, 17 Dec 2001 19:40:38 -0500 Subject: [PATCH] Making it somewhat more portable Message-ID: <20011218054038.GB4362@blackrider> p4raw-id: //depot/perl@13753 --- lib/ExtUtils/Installed.pm | 2 +- lib/ExtUtils/t/Installed.t | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) 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, }, }; -- 2.7.4