Subject: | scandeps.(bat|pl) doesn't correctly identify Core Modules on Windows |
Hi,
I've attached a log from running
scandeps -V -B some.pl > output.txt 2>&1
As you can see no modules have been identified as being Core modules
when there should be. E.g. strict. I believe this is down to the
following code:
if ($mod->{file} eq "$Config::Config{privlib}/$key"
or $mod->{file} eq "$Config::Config{archlib}/$key") {
next unless $core;
$core{$name}++;
}
by adding print statements I found that for the strict module:
$mod->{file} = C:/Perl/lib/strict.pm
however
$Config::Config{privlib} = C:\Perl\lib
$Config::Config{archlib} = C:\Perl\lib
Since the slashes go different ways (since this is windows :} the
equality fails. If I replace the above code with the following it works
properly (see output_fixed.txt):
my $privPath = "$Config::Config{privlib}/$key";
my $archPath = "$Config::Config{archlib}/$key";
$privPath =~ s|\\|\/|og;
$archPath =~ s|\\|\/|og;
if ($mod->{file} eq $privPath
or $mod->{file} eq $archPath) {
next unless $core;
$core{$name}++;
}
FYI, I'm using the following:
* Module-ScanDeps [0.70]
* perl, v5.8.4 built for MSWin32-x86-multi-thread, Binary build 810
provided by ActiveState Corp.
* Windows XP, Version 2002, Service Pack 2
Regards,
Adrian
Subject: | output.txt |
Message body is not shown because it is too large.
Subject: | output_fixed.txt |
Message body is not shown because it is too large.