On 10/25/07, Roderich Schupp <[EMAIL PROTECTED]> wrote:
> Maybe... though I don't know why Module::ScanDeps doesn't pick up
> Tk::Bitmap, the short example below (that's just the context of the single
The problem is line 570 of Module/ScanDeps.pm:
foreach my $file (@{$files}) {
my $key = shift @{$keys};
next if $skip->{$file}++;
next if is_insensitive_fs()
and $file ne lc($file) and $skip->{lc($file)}++;
next unless $file =~ $ScanFileRE;
local *FH;
open FH, $file or die "Cannot open $file: $!";
$SeenTk = 0; <------------------------
# Line-by-line scanning
LINE:
while (<FH>) {
The global variable $SeenTk records whether ScanDeps has encountered Tk.pm.
If true it enables (amongst other things) recognition of constructs like
(this is the single hint in Tk/FBox.pm that implies Tk::Bitmap)
...->Bitmap(...
which implies to look for Tk::Bitmap (this emulates the runtime
autoloading behaviour
of Tk modules). Now I would assume that once $SeenTk has been turned on
it should stay on. Apparently this is not the case: I see it being
flipped frequently.
Hence recognition of TK/Bitmap.pm depends on when Tk/FBox.pm gets scanned.
Steffen: Can you make any sense of resetting $SeenTk anytime
when entering scan_deps_static()? AFAICT this reset has been there from
the beginning.
Cheers, Roderich