Subject: | Missing dependencies with Tk::Widget -> setPalette() (patch) |
Hi,
given code like this:
use warnings;
use strict;
use Tk;
my $mw = MainWindow->new();
$mw -> setPalette('#fcfafa');
MainLoop();
M::SD misses some dependencies in the Tk Library. This is due to Tk's
dynamically loading of some of the core widgets in this case, which
hides their constructor from M::SD.
Patch attached.
Discussed on perlmonks (reported by srikrishnan):
http://perlmonks.org/?node_id=773263
Cheers, Christoph
Subject: | M-ScanDeps.pm.patch |
--- C:\Dokumente und Einstellungen\chris\Desktop\devel\ngre\Module\ScanDeps09-ori.pm So Jun 21 12:51:20 2009
+++ C:\Dokumente und Einstellungen\chris\Desktop\devel\ngre\Module\ScanDeps.pm So Jun 21 12:54:13 2009
@@ -813,6 +813,13 @@
push @modules, "Tk/$1.pm";
push @modules, "Tk/Scrollbar.pm";
}
+ while (/->\s*setPalette/g) {
+ push @modules, ('Tk/Labelframe.pm',
+ 'Tk/Message.pm',
+ 'Tk/Spinbox.pm',
+ 'Tk/Text.pm',
+ );
+ }
return \@modules;
}
return;