Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtUtils::Installed doesn't like '\' #2989

Closed
p5pRT opened this issue Dec 14, 2000 · 2 comments
Closed

ExtUtils::Installed doesn't like '\' #2989

p5pRT opened this issue Dec 14, 2000 · 2 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Dec 14, 2000

Migrated from rt.perl.org#4915 (status was 'resolved')

Searchable as RT4915$

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 14, 2000

From @AlanBurlison

Message-ID​: <001701c06564$a2c41bb0$0a00a8c0@​hippo2000>
Reply-To​: "Kawai,Takanori" <GCD00051@​nifty.ne.jp>
From​: "Kawai,Takanori" <GCD00051@​nifty.ne.jp>
To​: <Alan.Burlison@​uk.sun.com>
Subject​: ExtUtils​::Installed on Win32
Date​: Thu, 14 Dec 2000 09​:22​:31 +0900
Organization​: =?iso-2022-jp?B?GyRCRnxLXCVpJUMlSTN0PDAycTxSGyhC?=
MIME-Version​: 1.0
Content-Type​: text/plain;
  charset="iso-2022-jp"
Content-Transfer-Encoding​: 7bit
X-Priority​: 3
X-MSMail-Priority​: Normal
X-Mailer​: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE​: Produced By Microsoft MimeOLE V5.00.2919.6600
Content-Length​: 1093

Dear Mr. Burlison

I'm a using Perl5.6 on WinNT and Linux.
ExtUtils​::Installed works fine on Linux, does not work on WinNT.

I found that error occurs on these lines​:
<quote>
  $module =~ s!$Config{archlib}/auto/(.*)/.packlist!$1!s;
  $module =~ s!$Config{sitearch}/auto/(.*)/.packlist!$1!s;
</quote>

I think that backslash(es) contained in $Config{archlib} and
$Config{sitesearch} occurs error.So I change these lines like
below and it works fine​:
<quote>
# $module =~ s!$Config{archlib}/auto/(.*)/.packlist!$1!s;
# $module =~ s!$Config{sitearch}/auto/(.*)/.packlist!$1!s;
#---Modify---------
  my $sCfg = $Config{archlib};
  $sCfg =~ s/\\/\\\\/g;
  $module =~ s!$sCfg/auto/(.*)/.packlist!$1!s;
  my $sCfg = $Config{sitearch};
  $sCfg =~ s/\\/\\\\/g;
  $module =~ s!$sCfg/auto/(.*)/.packlist!$1!s;
#---Modify---------
</quote>

I hope this may be your help.

Sinceryly.

Kawai, Takanori(Hippo2000)
  Mail​: GCD00051@​nifty.ne.jp kwitknr@​cpan.org
  http​://member.nifty.ne.jp/hippo2000

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 14, 2000

From [Unknown Contact. See original ticket]

I'm a using Perl5.6 on WinNT and Linux.
ExtUtils​::Installed works fine on Linux, does not work on WinNT.

I found that error occurs on these lines​:
<quote>
$module =~ s!$Config{archlib}/auto/(.*)/.packlist!$1!s;
$module =~ s!$Config{sitearch}/auto/(.*)/.packlist!$1!s;
</quote>

I think that backslash(es) contained in $Config{archlib} and
$Config{sitesearch} occurs error.So I change these lines like
below and it works fine​:
<quote>
# $module =~ s!$Config{archlib}/auto/(.*)/.packlist!$1!s;
# $module =~ s!$Config{sitearch}/auto/(.*)/.packlist!$1!s;
#---Modify---------
my $sCfg = $Config{archlib};
$sCfg =~ s/\\/\\\\/g;
$module =~ s!$sCfg/auto/(.*)/.packlist!$1!s;
my $sCfg = $Config{sitearch};
$sCfg =~ s/\\/\\\\/g;
$module =~ s!$sCfg/auto/(.*)/.packlist!$1!s;
#---Modify---------
</quote>

Is this the "correct" patch​:

--- lib/ExtUtils/Installed.pm 2000/12/14 14​:23​:08 1.1
+++ lib/ExtUtils/Installed.pm 2000/12/14 14​:24​:44 1.2
@​@​ -67,8 +67,8 @​@​

  # Hack of the leading bits of the paths & convert to a module name
  my $module = $File​::Find​::name;
- $module =~ s!$Config{archlib}/auto/(.*)/.packlist!$1!s;
- $module =~ s!$Config{sitearch}/auto/(.*)/.packlist!$1!s;
+ $module =~ s!\Q$Config{archlib}\E/auto/(.*)/.packlist!$1!s;
+ $module =~ s!\Q$Config{sitearch}\E/auto/(.*)/.packlist!$1!s;
  my $modfile = "$module.pm";
  $module =~ s!/!​::!g;

Robin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant