[PATCH] Replace deprecated given and when operators Perl 5.37.11 depracated "given" and "when" keywords and scheduled them, together with a smart match operator, for removal in Perl 5.42.
This lead to t/81_scanimage-perl.t failures:
# Failed test '--device=test --test 2>&1' # at t/81_scanimage-perl.t line 42. # got: 'scanimage: scanning image of size 157x196 pixels at 8 bits/pixel # scanimage: acquiring gray frame, 8 bits/sample # scanimage: reading one scanline, 157 bytes... PASS # scanimage: reading one byte... PASS <...> # ' # expected: 'given is deprecated at examples/scanimage line 125. # when is deprecated at examples/scanimage line 126. # when is deprecated at examples/scanimage line 129. <...>
This patch rewrites the code not to use "given" and "when".