diff -pruN 0.3.4-1/Changes 0.3.5-1/Changes
--- 0.3.4-1/Changes	2018-10-14 18:41:10.000000000 +0000
+++ 0.3.5-1/Changes	2022-07-27 04:08:06.000000000 +0000
@@ -1,5 +1,15 @@
 Revision history for Test-Trap
 
+0.3.5	Wed 27 Jul 2022 05:58:02 AM CEST
+        No changes to the libraries, just to the tests.  Perl best
+        practices form a moving target.
+        - Stop using bareword filehandles; if it isn't deprecated
+          already, it will be.
+        - RT #143716: Perl pulled the rug from under me on untainting
+          environment variables when it stopped treating an empty
+          string as a safe PATH.  Fix by deleting the offending
+          environment variables instead, as suggested by Graham Knop.
+
 0.3.4	Sun Oct 14 20:39:41 CEST 2018
 	For this release, many thanks go to Todd Rinaldo, who found
         that my fix for the $^E clobbering wound up clobbering $! in
diff -pruN 0.3.4-1/debian/changelog 0.3.5-1/debian/changelog
--- 0.3.4-1/debian/changelog	2018-10-20 16:50:22.000000000 +0000
+++ 0.3.5-1/debian/changelog	2022-08-01 17:33:38.000000000 +0000
@@ -1,3 +1,25 @@
+libtest-trap-perl (0.3.5-1) unstable; urgency=medium
+
+  [ gregor herrmann ]
+  * debian/watch: use uscan version 4.
+
+  [ Debian Janitor ]
+  * Bump debhelper from old 10 to 12.
+  * Set debhelper-compat version in Build-Depends.
+  * Remove obsolete fields Contact, Name from debian/upstream/metadata
+    (already present in machine-readable debian/copyright).
+  * Bump debhelper from old 12 to 13.
+
+  [ gregor herrmann ]
+  * Import upstream version 0.3.5.
+  * Update years of packaging copyright.
+  * Update alternative versioned (test) dependencies.
+  * Declare compliance with Debian Policy 4.6.1.
+  * Set Rules-Requires-Root: no.
+  * Annotate test-only build dependencies with <!nocheck>.
+
+ -- gregor herrmann <gregoa@debian.org>  Mon, 01 Aug 2022 19:33:38 +0200
+
 libtest-trap-perl (0.3.4-1) unstable; urgency=medium
 
   [ Salvatore Bonaccorso ]
diff -pruN 0.3.4-1/debian/compat 0.3.5-1/debian/compat
--- 0.3.4-1/debian/compat	2018-10-20 16:50:22.000000000 +0000
+++ 0.3.5-1/debian/compat	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-10
diff -pruN 0.3.4-1/debian/control 0.3.5-1/debian/control
--- 0.3.4-1/debian/control	2018-10-20 16:50:22.000000000 +0000
+++ 0.3.5-1/debian/control	2022-08-01 17:33:38.000000000 +0000
@@ -4,23 +4,24 @@ Uploaders: gregor herrmann <gregoa@debia
 Section: perl
 Testsuite: autopkgtest-pkg-perl
 Priority: optional
-Build-Depends: debhelper (>= 10),
+Build-Depends: debhelper-compat (= 13),
                libmodule-build-perl
-Build-Depends-Indep: perl,
-                     libdata-dump-perl,
-                     libtest-refcount-perl,
-                     perl (>= 5.21.6) | libtest-simple-perl (>= 1.001010) | libtest-tester-perl
-Standards-Version: 4.2.1
+Build-Depends-Indep: libdata-dump-perl <!nocheck>,
+                     libtest-refcount-perl <!nocheck>,
+                     libtest-simple-perl <!nocheck>,
+                     perl
+Standards-Version: 4.6.1
 Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libtest-trap-perl
 Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libtest-trap-perl.git
 Homepage: https://metacpan.org/release/Test-Trap
+Rules-Requires-Root: no
 
 Package: libtest-trap-perl
 Architecture: all
-Depends: ${perl:Depends},
-         ${misc:Depends},
+Depends: ${misc:Depends},
+         ${perl:Depends},
          libdata-dump-perl,
-         perl (>= 5.21.6) | libtest-simple-perl (>= 1.001010) | libtest-tester-perl
+         libtest-simple-perl
 Description: test module to trap exit codes, exceptions, output, etc.
  Test::Trap is a Perl test module useful primarily (but not exclusively) for
  test scripts: a block eval on steroids, configurable and extensible, but by
diff -pruN 0.3.4-1/debian/copyright 0.3.5-1/debian/copyright
--- 0.3.4-1/debian/copyright	2018-10-20 16:50:22.000000000 +0000
+++ 0.3.5-1/debian/copyright	2022-08-01 17:33:38.000000000 +0000
@@ -9,7 +9,7 @@ License: Artistic or GPL-1+
 
 Files: debian/*
 Copyright: 2009, Jonathan Yu <jawnsy@cpan.org>
- 2009-2018, gregor herrmann <gregoa@debian.org>
+ 2009-2022, gregor herrmann <gregoa@debian.org>
  2012, Fabrizio Regalli <fabreg@fabreg.it>
 License: Artistic or GPL-1+
 
diff -pruN 0.3.4-1/debian/upstream/metadata 0.3.5-1/debian/upstream/metadata
--- 0.3.4-1/debian/upstream/metadata	2018-10-20 16:50:22.000000000 +0000
+++ 0.3.5-1/debian/upstream/metadata	1970-01-01 00:00:00.000000000 +0000
@@ -1,4 +0,0 @@
----
-Archive: CPAN
-Contact: Eirik Berg Hanssen <ebhanssen@cpan.org>
-Name: Test-Trap
diff -pruN 0.3.4-1/debian/watch 0.3.5-1/debian/watch
--- 0.3.4-1/debian/watch	2018-10-20 16:50:22.000000000 +0000
+++ 0.3.5-1/debian/watch	2022-08-01 17:33:38.000000000 +0000
@@ -1,2 +1,2 @@
-version=3
-https://metacpan.org/release/Test-Trap   .*/Test-Trap-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$
+version=4
+https://metacpan.org/release/Test-Trap   .*/Test-Trap-v?@ANY_VERSION@@ARCHIVE_EXT@$
diff -pruN 0.3.4-1/lib/Test/Trap/Builder/PerlIO.pm 0.3.5-1/lib/Test/Trap/Builder/PerlIO.pm
--- 0.3.4-1/lib/Test/Trap/Builder/PerlIO.pm	2018-10-14 18:41:10.000000000 +0000
+++ 0.3.5-1/lib/Test/Trap/Builder/PerlIO.pm	2022-07-27 04:08:06.000000000 +0000
@@ -1,6 +1,6 @@
 package Test::Trap::Builder::PerlIO;
 
-use version; $VERSION = qv('0.3.4');
+use version; $VERSION = qv('0.3.5');
 
 use strict;
 use warnings;
@@ -30,7 +30,7 @@ Test::Trap::Builder::PerlIO - Capture st
 
 =head1 VERSION
 
-Version 0.3.4
+Version 0.3.5
 
 =head1 DESCRIPTION
 
diff -pruN 0.3.4-1/lib/Test/Trap/Builder/SystemSafe.pm 0.3.5-1/lib/Test/Trap/Builder/SystemSafe.pm
--- 0.3.4-1/lib/Test/Trap/Builder/SystemSafe.pm	2018-10-14 18:41:10.000000000 +0000
+++ 0.3.5-1/lib/Test/Trap/Builder/SystemSafe.pm	2022-07-27 04:08:06.000000000 +0000
@@ -1,6 +1,6 @@
 package Test::Trap::Builder::SystemSafe;
 
-use version; $VERSION = qv('0.3.4');
+use version; $VERSION = qv('0.3.5');
 
 use strict;
 use warnings;
@@ -141,7 +141,7 @@ Test::Trap::Builder::SystemSafe - "Safe"
 
 =head1 VERSION
 
-Version 0.3.4
+Version 0.3.5
 
 =head1 DESCRIPTION
 
diff -pruN 0.3.4-1/lib/Test/Trap/Builder/TempFile.pm 0.3.5-1/lib/Test/Trap/Builder/TempFile.pm
--- 0.3.4-1/lib/Test/Trap/Builder/TempFile.pm	2018-10-14 18:41:10.000000000 +0000
+++ 0.3.5-1/lib/Test/Trap/Builder/TempFile.pm	2022-07-27 04:08:06.000000000 +0000
@@ -1,6 +1,6 @@
 package Test::Trap::Builder::TempFile;
 
-use version; $VERSION = qv('0.3.4');
+use version; $VERSION = qv('0.3.5');
 
 use strict;
 use warnings;
@@ -80,7 +80,7 @@ Test::Trap::Builder::TempFile - Capture
 
 =head1 VERSION
 
-Version 0.3.4
+Version 0.3.5
 
 =head1 DESCRIPTION
 
diff -pruN 0.3.4-1/lib/Test/Trap/Builder.pm 0.3.5-1/lib/Test/Trap/Builder.pm
--- 0.3.4-1/lib/Test/Trap/Builder.pm	2018-10-14 18:41:10.000000000 +0000
+++ 0.3.5-1/lib/Test/Trap/Builder.pm	2022-07-27 04:08:06.000000000 +0000
@@ -1,6 +1,6 @@
 package Test::Trap::Builder;
 
-use version; $VERSION = qv('0.3.4');
+use version; $VERSION = qv('0.3.5');
 
 use strict;
 use warnings;
@@ -385,7 +385,7 @@ Test::Trap::Builder - Backend for buildi
 
 =head1 VERSION
 
-Version 0.3.4
+Version 0.3.5
 
 =head1 SYNOPSIS
 
diff -pruN 0.3.4-1/lib/Test/Trap.pm 0.3.5-1/lib/Test/Trap.pm
--- 0.3.4-1/lib/Test/Trap.pm	2018-10-14 18:41:10.000000000 +0000
+++ 0.3.5-1/lib/Test/Trap.pm	2022-07-27 04:08:06.000000000 +0000
@@ -1,6 +1,6 @@
 package Test::Trap;
 
-use version; $VERSION = qv('0.3.4');
+use version; $VERSION = qv('0.3.5');
 
 use strict;
 use warnings;
@@ -304,7 +304,7 @@ Test::Trap - Trap exit codes, exceptions
 
 =head1 VERSION
 
-Version 0.3.4
+Version 0.3.5
 
 =head1 SYNOPSIS
 
diff -pruN 0.3.4-1/Makefile.PL 0.3.5-1/Makefile.PL
--- 0.3.4-1/Makefile.PL	2018-10-14 18:41:10.000000000 +0000
+++ 0.3.5-1/Makefile.PL	2022-07-27 04:08:06.000000000 +0000
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.4224
+# Note: this file was auto-generated by Module::Build::Compat version 0.4231
 require 5.006002;
 use ExtUtils::MakeMaker;
 WriteMakefile
@@ -25,8 +25,8 @@ WriteMakefile
   'INSTALLDIRS' => 'site',
   'EXE_FILES' => [],
   'PL_FILES' => {
-                  't/08-fork.PL' => 't/08-fork.t',
-                  't/11-systemsafe-basic.PL' => 't/11-systemsafe-basic.t'
+                  't/11-systemsafe-basic.PL' => 't/11-systemsafe-basic.t',
+                  't/08-fork.PL' => 't/08-fork.t'
                 }
 )
 ;
diff -pruN 0.3.4-1/META.json 0.3.5-1/META.json
--- 0.3.4-1/META.json	2018-10-14 18:41:10.000000000 +0000
+++ 0.3.5-1/META.json	2022-07-27 04:08:06.000000000 +0000
@@ -4,13 +4,13 @@
       "Eirik Berg Hanssen <ebhanssen@cpan.org>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "Module::Build version 0.4224",
+   "generated_by" : "Module::Build version 0.4231",
    "license" : [
       "perl_5"
    ],
    "meta-spec" : {
       "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
-      "version" : "2"
+      "version" : 2
    },
    "name" : "Test-Trap",
    "prereqs" : {
@@ -43,23 +43,23 @@
    "provides" : {
       "Test::Trap" : {
          "file" : "lib/Test/Trap.pm",
-         "version" : "v0.3.4"
+         "version" : "v0.3.5"
       },
       "Test::Trap::Builder" : {
          "file" : "lib/Test/Trap/Builder.pm",
-         "version" : "v0.3.4"
+         "version" : "v0.3.5"
       },
       "Test::Trap::Builder::PerlIO" : {
          "file" : "lib/Test/Trap/Builder/PerlIO.pm",
-         "version" : "v0.3.4"
+         "version" : "v0.3.5"
       },
       "Test::Trap::Builder::SystemSafe" : {
          "file" : "lib/Test/Trap/Builder/SystemSafe.pm",
-         "version" : "v0.3.4"
+         "version" : "v0.3.5"
       },
       "Test::Trap::Builder::TempFile" : {
          "file" : "lib/Test/Trap/Builder/TempFile.pm",
-         "version" : "v0.3.4"
+         "version" : "v0.3.5"
       }
    },
    "release_status" : "stable",
@@ -68,6 +68,6 @@
          "http://dev.perl.org/licenses/"
       ]
    },
-   "version" : "v0.3.4",
-   "x_serialization_backend" : "JSON::PP version 2.27400_02"
+   "version" : "v0.3.5",
+   "x_serialization_backend" : "JSON::PP version 4.02"
 }
diff -pruN 0.3.4-1/META.yml 0.3.5-1/META.yml
--- 0.3.4-1/META.yml	2018-10-14 18:41:10.000000000 +0000
+++ 0.3.5-1/META.yml	2022-07-27 04:08:06.000000000 +0000
@@ -6,7 +6,7 @@ build_requires: {}
 configure_requires:
   Module::Build: '0'
 dynamic_config: 1
-generated_by: 'Module::Build version 0.4224, CPAN::Meta::Converter version 2.150010'
+generated_by: 'Module::Build version 0.4231, CPAN::Meta::Converter version 2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -15,19 +15,19 @@ name: Test-Trap
 provides:
   Test::Trap:
     file: lib/Test/Trap.pm
-    version: v0.3.4
+    version: v0.3.5
   Test::Trap::Builder:
     file: lib/Test/Trap/Builder.pm
-    version: v0.3.4
+    version: v0.3.5
   Test::Trap::Builder::PerlIO:
     file: lib/Test/Trap/Builder/PerlIO.pm
-    version: v0.3.4
+    version: v0.3.5
   Test::Trap::Builder::SystemSafe:
     file: lib/Test/Trap/Builder/SystemSafe.pm
-    version: v0.3.4
+    version: v0.3.5
   Test::Trap::Builder::TempFile:
     file: lib/Test/Trap/Builder/TempFile.pm
-    version: v0.3.4
+    version: v0.3.5
 requires:
   Carp: '0'
   Config: '0'
@@ -47,5 +47,5 @@ requires:
   warnings: '0'
 resources:
   license: http://dev.perl.org/licenses/
-version: v0.3.4
+version: v0.3.5
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -pruN 0.3.4-1/t/03-files.pl 0.3.5-1/t/03-files.pl
--- 0.3.4-1/t/03-files.pl	2018-10-14 18:41:10.000000000 +0000
+++ 0.3.5-1/t/03-files.pl	2022-07-27 04:08:06.000000000 +0000
@@ -41,7 +41,7 @@ STDERR: {
   open STDERR, '>', $errname;
   STDERR->autoflush(1);
   print STDOUT '';
-  sub stderr () { local $/; no warnings 'io'; local *ERR; open ERR, '<', $errname or die; <ERR> }
+  sub stderr () { local $/; no warnings 'io'; open my $ERR, '<', $errname or die; <$ERR> }
   END { close STDERR; close $errfh }
 }
 
diff -pruN 0.3.4-1/t/06-layers.t 0.3.5-1/t/06-layers.t
--- 0.3.4-1/t/06-layers.t	2018-10-14 18:41:10.000000000 +0000
+++ 0.3.5-1/t/06-layers.t	2022-07-27 04:08:06.000000000 +0000
@@ -147,7 +147,7 @@ STDOUT: {
   open STDOUT, '>', $outname;
   STDOUT->autoflush(1);
   print STDOUT '';
-  sub stdout () { local $/; local *OUT; open OUT, '<', $outname or die; <OUT> }
+  sub stdout () { local $/; open my $OUT, '<', $outname or die; <$OUT> }
   END { close STDOUT; close $outfh }
 }
 
@@ -157,7 +157,7 @@ STDERR: {
   open STDERR, '>', $errname;
   STDERR->autoflush(1);
   print STDERR '';
-  sub stderr () { local $/; local *ERR; open ERR, '<', $errname or die; <ERR> }
+  sub stderr () { local $/; open my $ERR, '<', $errname or die; <$ERR> }
   END { close STDERR; close $errfh }
 }
 
diff -pruN 0.3.4-1/t/11-systemsafe-basic.PL 0.3.5-1/t/11-systemsafe-basic.PL
--- 0.3.4-1/t/11-systemsafe-basic.PL	2018-10-14 18:41:10.000000000 +0000
+++ 0.3.5-1/t/11-systemsafe-basic.PL	2022-07-27 04:08:06.000000000 +0000
@@ -102,10 +102,10 @@ BEGIN {
 }
 
 # Protect against tainted PATH &c ...
-$ENV{PATH} = '';
-$ENV{CDPATH} = '';
-$ENV{ENV} = '';
-$ENV{BASH_ENV} = '';
+delete $ENV{PATH};
+delete $ENV{CDPATH};
+delete $ENV{ENV};
+delete $ENV{BASH_ENV};
 
 my ($PERL) = $^X =~ /^([\w.\/:\\~-]+)$/;
 if ($PERL) {
