carygravel / gtk3-imageview

2 stars 3 forks source link

Replace deprecated given/when with if/elsif/else #30

Closed gregoa closed 11 months ago

gregoa commented 11 months ago

In Debian we are currently applying the following patch to Gtk3-ImageView. We thought you might be interested in it too.

Description: Replace deprecated given/when with if/elsif/else
 given/when is deprecated since Perl 5.38 and will be removed in 5.42.
 In 5.38 it throws warnings:
 .
 given is deprecated at /build/libgtk3-imageview-perl-10/blib/lib/Gtk3/ImageView.pm line 179.
 when is deprecated at /build/libgtk3-imageview-perl-10/blib/lib/Gtk3/ImageView.pm line 180.
 when is deprecated at /build/libgtk3-imageview-perl-10/blib/lib/Gtk3/ImageView.pm line 184.
 when is deprecated at /build/libgtk3-imageview-perl-10/blib/lib/Gtk3/ImageView.pm line 189.
 when is deprecated at /build/libgtk3-imageview-perl-10/blib/lib/Gtk3/ImageView.pm line 200.
 when is deprecated at /build/libgtk3-imageview-perl-10/blib/lib/Gtk3/ImageView.pm line 204.
 when is deprecated at /build/libgtk3-imageview-perl-10/blib/lib/Gtk3/ImageView.pm line 208.
 when is deprecated at /build/libgtk3-imageview-perl-10/blib/lib/Gtk3/ImageView.pm line 216.
 when is deprecated at /build/libgtk3-imageview-perl-10/blib/lib/Gtk3/ImageView.pm line 237.
 given is deprecated at /build/libgtk3-imageview-perl-10/blib/lib/Gtk3/ImageView.pm line 615.
 when is deprecated at /build/libgtk3-imageview-perl-10/blib/lib/Gtk3/ImageView.pm line 616.
 when is deprecated at /build/libgtk3-imageview-perl-10/blib/lib/Gtk3/ImageView.pm line 619.
 .
 Use plain old if/elsif/else chains instead.
Origin: vendor
Bug-Debian: https://bugs.debian.org/1050445
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2023-11-17

The patch is tracked in our Git repository at https://salsa.debian.org/perl-team/modules/packages/libgtk3-imageview-perl/raw/master/debian/patches/given_when.patch

Thanks for considering, gregor herrmann, Debian Perl Group

DarthGandalf commented 11 months ago

Thanks.

Linter failed, but the failure seems to be related to bitrot of CI setup, not to this PR. /action/lib/linter.sh: line 57: /action/lib/functions/tapLibrary.sh: No such file or directory

gregoa commented 11 months ago

On Fri, 17 Nov 2023 12:32:59 -0800, Alexey Sokolov wrote:

Merged #30 into master.

Thank you!

-- .''. https://info.comodo.priv.at -- Debian Developer https://www.debian.org : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06 . ' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe -