Subject: | scan_deps doesn't show ALL the dependencies |
Hi,
I've been seeing some problems with ScanDeps where not all the
dependencies present are actually included in the hash returned by the
subrountine scan_deps. To see this unzip the scandeps_test.zip file
provided. It contains:
* scandeps_test.pl: running this re-creates the output files.
* use_*.pl: inputs to scandeps_test.pl.
* output_*.txt: the output of scandeps_test.pl using my environment.
My analysis shows the following problems:
i) compare
output_use_warnings_and_use_strict.txt
and
output_use_strict_and_use_warnings.txt.
These should be the same but they're not: the types of two modules
differ between the files.
ii) compare
output_use_strict_+_warnings.txt
and
output_use_strict_and_use_warnings.txt.
These should be the same but they're not: the used_by attribute of two
modules differ between the files.
iii) compare
output_use_warnings.txt
and
output_use_strict.txt
The files don't have to be identical but:
A) the output format for key: strict.pm differs between the files
(problem with Data::Dump I believe)
B) despite (A) there is a significant difference between the files for
strict.pm's output. output_use_warnings.txt shows it being used by
Carp/Heavy.pm whereas output_use_strict.txt shows it isn't used by
anything. Potentially it could be because Carp/Heavy.pm changes it's
dependencies at runtime but I doubt the module would change it's use of
strict.pm.
C) warnings.pm is shown as using Carp/Heavy.pm by
output_use_strict.txt but not by output_use_warnings.txt.
iv) In none of the output files does a module have more than one entry
in it's used_by attribute.
I couldn't see any different problems when comparing other combinations
of the files.
I believe the problems are cause by the following:
1) The used_by attribute of a module only ever shows the latest
dependency identified. I.e. instead of appending the new dependency the
latest one overwrites whatever was there before.
2) None of the dependencies from one of the initial files passed into
scan_deps to one of the modules are shown. Potentially this is because
scan_deps uses "" instead of the file name. This would explain (iii)(B)
and (iii)(C) if "" was overwriting (as per (1)) Carp/Heavy.pm.
Note I've not checked the code actually does what I've described above
rather I've infered it from the results of the testing.
I've marked this bug as Critical as there's not much point using the
module if either of the two problems above are present. However, if I
am right about the causes of the problem then they don't look too hard
to fix so hopefully I will be using this module properly in the near
future :)
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: | scandeps_test.zip |
Message body not shown because it is not plain text.