#1113874 perl-tk: warns with Perl 5.42: Possible precedence problem between ! and numeric eq (==)

Package:
perl-tk
Source:
perl-tk
Description:
Perl module providing the Tk graphics library
Submitter:
Niko Tyni
Date:
2026-08-28 15:37:02 UTC
Severity:
normal
Tags:
#1113874#5
Date:
2025-09-03 17:51:43 UTC
From:
To:
Package: perl-tk
Version: 1:804.036+dfsg1-5
Severity: important
Tags: forky sid
User: debian-perl@lists.debian.org
Usertags: perl-5.42-transition

One of the modules in this package warns when used with Perl 5.42
(currently in experimental.) This also propagates to at least one another
package, causing an autopkgtest regression there.

https://ci.debian.net/packages/libc/libconfig-model-tkui-perl/unstable/amd64/64017476/

  $ perl -we 'use Tk::Pane'
  Possible precedence problem between ! and numeric eq (==) at /usr/lib/x86_64-linux-gnu/perl5/5.42/Tk/Pane.pm line 297.

If you want to test changes against Perl 5.42 in experimental and run
into uninstallability problems, there is a test repository of rebuilt
Debian sid packages for amd64 available at <https://perl.debian.net/>.

#1113874#10
Date:
2026-07-25 09:17:33 UTC
From:
To:
Control: severity -1 serious

Perl 5.42 is now in sid, and this issue is causing a debci regression
in libconfig-model-tkui-perl.

https://ci.debian.net/packages/libc/libconfig-model-tkui-perl/testing/amd64/73772242/

Raising the severity accordingly.

#1113874#19
Date:
2026-08-06 17:01:50 UTC
From:
To:
Hi

This bug breaks autopkgtest on libconfig-model-tkui-perl.

As a consequence, this package was removed from testing along all its reverse
dependencies.

Could you create a new release so that these packages can go back to testing ?

All the best

#1113874#24
Date:
2026-08-07 10:06:21 UTC
From:
To:
Hi Dominique, hi debian-devel@,

I tried to fix perl-tk, because Bug#1113874, with no success so far.

The upstream repository, https://github.com/eserte/perl-tk/ shows no
change since half a year; I raised an issue about it at
https://github.com/eserte/perl-tk/issues/123

Unfortunately, updating the source package to its current head from github
does not fix the issue.

Last but no least: I have very poor skills about Perl and its test framework.
Thank you in advance for any help or suggestion.

Best regards,	     	     Georges.

Dominique Dumont a écrit :

#1113874#29
Date:
2026-08-10 09:28:50 UTC
From:
To:
Rewrapped slightly to try and improve readability:

my $do_gridded = (
    $gridded eq 'both' || (
        !$horz == (
            $gridded ne 'x'
        )
    )
) ? 1 : 0;

Seems it's the !$horz == ( at fault - it's appalling code.
https://github.com/eserte/perl-tk/commit/3a13aed7a07cd82347695b9595234f629803aef3,
dating from 2025, does seem relevant.

Tk::Pane: fix precedence warning (new in perl 5.41.x)
Warning looked like this:

   Possible precedence problem between ! and numeric eq (==) at
   .../blib/lib/Tk/Pane.pm line 297


It resolves the precedence issue around $horz.

From (!$horz == to ((!$horz) ==

Check that this commit is retained after patching etc. during the
build. It's a small change, adding two brackets, easy to miss.
probably 10 years. But I saw the post of -devel and had a look anyway.
I haven't tried to build the package.

Just check that when you updated to latest upstream git that the effect
of this commit was retained and whether that changed the way that the
build failed or changed the messages. It's entirely possible that code
written this badly will cause secondary bugs.

PS - this is a horrible way to write code in any language and someone
should be ashamed of themselves to let that into a release. It
desperately needs to be expanded and tested in more detail.

#1113874#34
Date:
2026-08-10 13:34:16 UTC
From:
To:
Hello Neil,

thank a lot for the patch, it does the trick!

thank you also about the reminder about right style for code.

Best regards,  	     	 Georges.

Neil Williams a écrit :

#1113874#39
Date:
2026-08-10 13:51:04 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
perl-tk, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1113874@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Georges Khaznadar <georgesk@debian.org> (supplier of updated perl-tk package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 10 Aug 2026 15:05:17 +0200
Source: perl-tk
Architecture: source
Version: 1:804.036+dfsg1-7
Distribution: unstable
Urgency: medium
Maintainer: Georges Khaznadar <georgesk@debian.org>
Changed-By: Georges Khaznadar <georgesk@debian.org>
Closes: 1113874
Changes:
 perl-tk (1:804.036+dfsg1-7) unstable; urgency=medium
 .
   * patched file Tk/Pane.pm to isolate the "!" operator
     (fixes-for-perl524.patch). Closes: #1113874
   * fixed the name of this patch
     (fixes-for-perl524.patch -> fixes-for-perl542.patch)
   * modified the patch for Perl syntax, thanks to Neil Williams' proposal
Checksums-Sha1:
 35e25d7d6081170555ba3277173f726c1e329d7d 2079 perl-tk_804.036+dfsg1-7.dsc
 e4c8334002ce1e485196753992a48a9943d35add 19252 perl-tk_804.036+dfsg1-7.debian.tar.xz
 27f56184f5e54e40adaf94745cf540abd42bb2ab 8239 perl-tk_804.036+dfsg1-7_source.buildinfo
Checksums-Sha256:
 f8a395ce48095a7f49ff4fd1332067f4c5c2f5f9f465d4e7cebd74c66b177e62 2079 perl-tk_804.036+dfsg1-7.dsc
 4be8747cf1dc2c2ee946ddc5d211298016a67d20031aa3d726b1ac8cafd7c457 19252 perl-tk_804.036+dfsg1-7.debian.tar.xz
 4ad3bf5cf1a1e79a06f7aebcb76d979099ee5a4b11270ebe6ecd567dc8c05eb2 8239 perl-tk_804.036+dfsg1-7_source.buildinfo
Files:
 6f7184bd0e570140b5ff85167a5d835a 2079 perl optional perl-tk_804.036+dfsg1-7.dsc
 0b47f2dd7d6e94d843de33cd1bfe5fd5 19252 perl optional perl-tk_804.036+dfsg1-7.debian.tar.xz
 b2dc61137ff11dd591c5e1c00cd644be 8239 perl optional perl-tk_804.036+dfsg1-7_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEEM0CzZP9nFT+3zK6FHCgWkHE2rjkFAmp50roUHGdlb3JnZXNr
QGRlYmlhbi5vcmcACgkQHCgWkHE2rjnsuw//YY7rf7Gqu2qVk++xaRhdXXtkEnOF
PO3fSIGsBrttwDneMpxeBP9zcROeD204vv4Se/FAfoQWwh3Mt+tJIu/rEvwASkee
owGKFenSJ2FBVOJmn9H70cKFdcV0vQQJyrR4Dspvt7NE3y8XWyQsBuntHz81ETPU
lqhqWM7VyT1+nPFz/zzXWhoROGJ5iSGPFwVTGeUiXo4ECKj9DBwTG2hitoXF00E9
7QEicBI8qYWzVE8LhtY+QoWINaDHNRDRBnYcvSXb4Dp+97Fxn8VI3yNgk8DtsFum
kJvgq662MVmbfQb/ATARkBMJyZo8mznCOmBbP8BoEeXiwlsSn2esZiTeaILuWJ1c
zIR71dmwwKa1kCleeJcZhPbPfVzV2AC6kwmf+K16u92YaGeoS7uEu51WZC1gFkbM
xWSRbGQx8EhPyczGXZL0d+QQL4qxDQqv8xG5fqdGtnM0suq9BPsd6mGzDIVex6D0
2AE+jlhIddUUggBPJdJM7T6ANeSZ4t0NWf4/6woOayMBnkyUKzPlZkAab8GIWf6V
RhZiB2sbAMErHzCvDNCZWNQNrBHWIH9ZepT2NY40bX4qX37ZiZBtrU58HF8ivQoJ
/03BGHFOG3m1fk+tTRZ8fFcSQLBggwVxng57vdW1h2BTHrwiTJRbXHXsa/lMJrYV
LVLqhrBFgQc9R/M=
=dLWh
-----END PGP SIGNATURE-----

#1113874#44
Date:
2026-08-11 16:42:46 UTC
From:
To:
Hi

Unfortunately, the last version of the patch is wrong.

Line [1] should be:

 	(!$horz) == (

and not:

	!$horz == (

All the best

[1] https://salsa.debian.org/georgesk/perl-tk/-/blame/master/debian/patches/fixes-for-perl542.patch?ref_type=heads#L17

#1113874#49
Date:
2026-08-18 20:51:35 UTC
From:
To:
(dropped debian-devel@ but added debian-perl@ instead)

Hi, this bug was closed with the 1:804.036+dfsg1-7 upload, but the bug is
unfortunately still present, as seen with this:

  # perl -we 'use Tk::Pane'
  Possible precedence problem between ! and numeric eq (==) at /usr/lib/x86_64-linux-gnu/perl5/5.42/Tk/Pane.pm line 302.

So reopening.

To the contrary, my tests indicate that the attached patch from

https://github.com/eserte/perl-tk/commit/3a13aed7a07cd82347695b9595234f629803aef3

fixes the issue. Please use this instead of the current ineffective patch.

Have you considered moving perl-tk to the pkg-perl group maintenance?
I think it would fit there well. See https://perl-team.pages.debian.net/
for more information.

Hope this helps. Thank you for maintaining perl-tk.

#1113874#58
Date:
2026-08-28 15:35:01 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
perl-tk, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1113874@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Georges Khaznadar <georgesk@debian.org> (supplier of updated perl-tk package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 28 Aug 2026 16:17:49 +0200
Source: perl-tk
Architecture: source
Version: 1:804.036+git20260828+dfsg-1
Distribution: unstable
Urgency: medium
Maintainer: Georges Khaznadar <georgesk@debian.org>
Changed-By: Georges Khaznadar <georgesk@debian.org>
Closes: 1113874
Changes:
 perl-tk (1:804.036+git20260828+dfsg-1) unstable; urgency=medium
 .
   * New upstream version 804.036+git20260828+dfsg
     + as per https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1113874,
       the commit message for https://github.com/eserte/perl-tk/commit/
       3a13aed7a07cd82347695b9595234f629803aef3 claims to
       resolve the precedence issue around $horz. Closes: #1113874
   * removed the debian patch fixes-for-perl542.patch and anoter
     unused patch.
   * documented the cleaning operations made with upstream source
Checksums-Sha1:
 8a4662823e6eb36049c5e2ca8eaec225ef2c2bb5 2156 perl-tk_804.036+git20260828+dfsg-1.dsc
 9818517c1b961a2da02fca6308141c310e1f1533 6991557 perl-tk_804.036+git20260828+dfsg.orig.tar.gz
 d9ef70709589351e3bb247fe4118d6cf3c2adf72 18992 perl-tk_804.036+git20260828+dfsg-1.debian.tar.xz
 63933f72899304bdfd8121eb6d1d500ef5856e5a 8294 perl-tk_804.036+git20260828+dfsg-1_source.buildinfo
Checksums-Sha256:
 96a26fd0a97e0f1637eefea0463f649b99965a6b56a90bc0c569aaf6be9014b3 2156 perl-tk_804.036+git20260828+dfsg-1.dsc
 d4e199052cdd3c4fdfc7980be0e51549bedcb20eefca1592421ebdad4a40dc20 6991557 perl-tk_804.036+git20260828+dfsg.orig.tar.gz
 d507c679893514035bdff0ae982e02ecd53ccfea2230e0b8166e015dff411ba9 18992 perl-tk_804.036+git20260828+dfsg-1.debian.tar.xz
 f437ef59c31a2292a4ef368fb1c7355bf62610fd37407de3eb6e8a927305306b 8294 perl-tk_804.036+git20260828+dfsg-1_source.buildinfo
Files:
 1839eb13dbaf90653d62249bb8993b8d 2156 perl optional perl-tk_804.036+git20260828+dfsg-1.dsc
 019c8b9a68ac3141c91e33423476739e 6991557 perl optional perl-tk_804.036+git20260828+dfsg.orig.tar.gz
 70aafafbbe15d3b6acbee33d13013662 18992 perl optional perl-tk_804.036+git20260828+dfsg-1.debian.tar.xz
 83fd1cdd235a7f7711206ed57d59ec92 8294 perl optional perl-tk_804.036+git20260828+dfsg-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEEM0CzZP9nFT+3zK6FHCgWkHE2rjkFAmqRpvoUHGdlb3JnZXNr
QGRlYmlhbi5vcmcACgkQHCgWkHE2rjlCiw//d34m+GqUKco5vWieZoD7FuE87uSW
tpEFzpaPjQKsUig3QKEmRCR5Lu3q9/uIbCHNHX0zkBuEpzPn6fE9h88zEMCExoF+
+Q4G+tEue3D3WO/Vlsr35MgElHjeutAbR0/k+R4FqB3zvL/jGxCYbhUJnLqGrZxl
YOgaaRgbnTppFMLcMRFJyjQ5ihgUbwxO1Onl1r0Uh5BsKmo1Y2fMstC1aKP91V8g
UGU0a5/RtCUzl22mS8AoJc7SCjws7jhSiLPU4GuO37mNto0y20XZvb00m5N4qH8s
WzaeDjPeEtoyRXcYgj3Wyke6uhCLrPXQPqrDA65dt48YvvDxKoRVsCPreWrFylQF
QFkSnt5ETwd3foJX1NOvPr5xeg9zB14DFBD+xsrJtJrNZjVVYqD3hy44rzoB/T8R
lVs0cJ9qq4vPLIVVyf/yMEioX0IleF721V1R+tiKYdqit5LXOO9J0h+k5BsDmUPO
3eWegwxRZaQbhbHZkw0YkbVLXV/6hjAPmQo0StwAdbdZcG8kh+ccOOfiorrG8PW1
VUvP5PhFUsBzS9yE4Fy0KQiHvrI3c05gUqlV3VXWwTApjoXKcLV4bBm8pP7uQXjj
1GPicpbO9M9C1W2hZKmc1mWXKLr6HFItlO+16tHscIGFBpjk5whUFAG70yIS9ZzF
F2RZshNx/wS7DwQ=
=dyjY
-----END PGP SIGNATURE-----