Change 13753 by jhi@alpha on 2001/12/18 14:02:49

        Subject: [PATCH lib/ExtUtils/t/Installed.t] Making it somewhat more portable
        From: Michael G Schwern <[EMAIL PROTECTED]>
        Date: Tue, 18 Dec 2001 00:40:38 -0500
        Message-ID: <20011218054038.GB4362@blackrider>

Affected files ...

.... //depot/perl/lib/ExtUtils/Installed.pm#13 edit
.... //depot/perl/lib/ExtUtils/t/Installed.t#2 edit

Differences ...

==== //depot/perl/lib/ExtUtils/Installed.pm#13 (text) ====
Index: perl/lib/ExtUtils/Installed.pm
--- perl/lib/ExtUtils/Installed.pm.~1~  Tue Dec 18 07:15:05 2001
+++ perl/lib/ExtUtils/Installed.pm      Tue Dec 18 07:15:05 2001
@@ -85,7 +85,7 @@
 
 # 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

==== //depot/perl/lib/ExtUtils/t/Installed.t#2 (text) ====
Index: perl/lib/ExtUtils/t/Installed.t
--- perl/lib/ExtUtils/t/Installed.t.~1~ Tue Dec 18 07:15:05 2001
+++ perl/lib/ExtUtils/t/Installed.t     Tue Dec 18 07:15:05 2001
@@ -88,13 +88,15 @@
 
        # 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 @@
 # 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,
        },
 };
End of Patch.

Reply via email to