RE: [PATCH] Derived.pm
"Jack D." <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
Oops - sorry. The diff file was in the "wrong direction" Fixed diff attached. Jack > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Jack D. > Sent: May 15, 2005 1:46 AM > To: [email protected] > Subject: [PATCH] Derived.pm > > The following message was posted on c.l.p.tk by "Tim": > > <quote>#### > Sorry, but I am not a frequent user of perl/Tk and could not > find a better way of reporting this problem (email to the > address for Nick in the FAQ is returned 'user unknown'). > > There is a small coding slip in Derived.pm line 94 (version 4.010) > > foreach my $key (%$widget) > > should be > > foreach my $key (keys %$widget) > > This leads to all kinds of strange errors, none near this > particular statement. The amazing thing, however, is how > often the code runs with no symptoms of any problem at all! > </quote>#### > > The attached file provides a patch for this *problem*?? For > curiosity-sake, I looked in the backpan archives and > discovered that this "bug" was introduced in version 402.001 > (June 1997) > > So - now I'm wondering whether this is an actual bug? Or does > that portion of the Subconfigure method never get called? I > mean that was 8 years ago with no real problems :) > > > Jack >
derived.diff
(application/octet-stream, 302 B)
--- derived.pm Fri Nov 21 20:52:16 2003
+++ derived.pm.new Sun May 15 01:24:28 2005
@@ -91,7 +91,7 @@
}
elsif ($ref eq 'HASH')
{
- foreach my $key (%$widget)
+ foreach my $key (keys %$widget)
{
foreach my $sw (_makelist($widget->{$key}))
{