[rt.cpan.org #47209] Missing dependencies with Tk::Widget -> setPalette() (patch)

2009-06-21 Thread Lamprecht Christoph via RT
Sun Jun 21 07:05:26 2009: Request 47209 was acted upon.
Transaction: Ticket created by LAMPRECHT
   Queue: Module-ScanDeps
 Subject: Missing dependencies with Tk::Widget -> setPalette() (patch)
   Broken in: 0.90
Severity: (no value)
   Owner: Nobody
  Requestors: lampre...@cpan.org
  Status: new
 Ticket https://rt.cpan.org/Ticket/Display.html?id=47209 >


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



M-ScanDeps.pm.patch
Description: Binary data


Re: [rt.cpan.org #47209] Missing dependencies with Tk::Widget -> setPalette() (patch)

2009-06-21 Thread Roderich Schupp via RT
Sun Jun 21 18:12:57 2009: Request 47209 was acted upon.
Transaction: Correspondence added by roderich.sch...@googlemail.com
   Queue: Module-ScanDeps
 Subject: Re: [rt.cpan.org #47209] Missing dependencies with Tk::Widget ->  
setPalette() (patch)
   Broken in: 0.90
Severity: (no value)
   Owner: Nobody
  Requestors: lampre...@cpan.org
  Status: new
 Ticket http://rt.cpan.org/Ticket/Display.html?id=47209 >


On Sun, Jun 21, 2009 at 1:05 PM, Lamprecht Christoph via RT
 wrote:
> 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.

Reading the source of setPalette (in Tk/Widget.pm) this patch
misses a few widgets. It should look like:

@@ -813,6 +813,12 @@
 push @modules, "Tk/$1.pm";
 push @modules, "Tk/Scrollbar.pm";
 }
+if (/->\s*setPalette/g) {
+push @modules, map { "Tk/$_pm" } qw(Button Canvas
Checkbutton Entry
+
Frame Label Labelframe Listbox
+
Menubutton Menu Message Radiobutton
+
Scale Scrollbar Spinbox Text)
+}
 return \...@modules;
 }
 return;


Cheers, Roderich