Control: tag -1 pending On Mon, Dec 28, 2015 at 02:31:46PM +0000, Colin Watson wrote: > On Sun, Dec 27, 2015 at 01:36:49PM +0200, Niko Tyni wrote: > > This package now warns on usage, and makes its reverse dependencies > > like libmoosex-types-iso8601-perl do so as well. > > > > % perl -w -e 'use DateTime::Format::Duration' > > Unescaped left brace in regex is deprecated, passed through in regex; > > marked by <-- HERE in m/%{ <-- HERE (\w+)}/ at > > /usr/share/perl5/DateTime/Format/Duration.pm line 583. > > Unescaped left brace in regex is deprecated, passed through in regex; > > marked by <-- HERE in m/(%{ <-- HERE (\w+)})/ at > > /usr/share/perl5/DateTime/Format/Duration.pm line 584. > > https://github.com/karenetheridge/DateTime-Format-Duration/commit/640674988a1e62a780967d5045df5f2ed2987cde > fixes this and can be cherry-picked as follows, although a maintainer > upload should possibly just upgrade to 1.04. > > * Cherry-pick from upstream: fix "Unescaped left brace in regex is > deprecated" warning in 5.22+ (closes: #809101).
Thanks, Colin! I've uploaded an NMU to DELAYED/10 with the attached patch. Jonas, please let me know if you'd like to fix this yourself, or alternatively, if you'd like to see the pkg-perl group adopt this package. -- Niko Tyni nt...@debian.org
diff -Nru libdatetime-format-duration-perl-1.03a/debian/changelog libdatetime-format-duration-perl-1.03a/debian/changelog --- libdatetime-format-duration-perl-1.03a/debian/changelog 2016-01-08 11:12:51.000000000 +0200 +++ libdatetime-format-duration-perl-1.03a/debian/changelog 2016-01-08 10:51:08.000000000 +0200 @@ -1,3 +1,13 @@ +libdatetime-format-duration-perl (1.03a-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Cherry-pick from upstream: fix "Unescaped left brace in regex is + deprecated" warning in 5.22+, thanks to Colin Watson. + (Closes: #809101) + + switch the package to the "3.0 (quilt)" source format. + + -- Niko Tyni <nt...@debian.org> Fri, 08 Jan 2016 10:45:59 +0200 + libdatetime-format-duration-perl (1.03a-1) unstable; urgency=low * Initial Release. (Closes: #632353) diff -Nru libdatetime-format-duration-perl-1.03a/debian/patches/0001-fix-regex-warning-in-perl-5.22.patch libdatetime-format-duration-perl-1.03a/debian/patches/0001-fix-regex-warning-in-perl-5.22.patch --- libdatetime-format-duration-perl-1.03a/debian/patches/0001-fix-regex-warning-in-perl-5.22.patch 1970-01-01 02:00:00.000000000 +0200 +++ libdatetime-format-duration-perl-1.03a/debian/patches/0001-fix-regex-warning-in-perl-5.22.patch 2016-01-08 11:03:26.000000000 +0200 @@ -0,0 +1,31 @@ +From 1f783cac482a9572687cdc4118d84142db91f310 Mon Sep 17 00:00:00 2001 +From: Niko Tyni <nt...@debian.org> +Date: Fri, 8 Jan 2016 10:41:38 +0200 +Subject: [PATCH] fix regex warning in perl 5.22+ + +Author: Karen Etheridge <et...@cpan.org> +Origin: backport, https://github.com/karenetheridge/DateTime-Format-Duration/commit/640674988a1e62a780967d5045df5f2ed2987cde +Bug: https://rt.cpan.org/Ticket/Display.html?id=101607 +Bug-Debian: https://bugs.debian.org/809101 +--- + lib/DateTime/Format/Duration.pm | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/DateTime/Format/Duration.pm b/lib/DateTime/Format/Duration.pm +index e5f0af8..8f1f565 100755 +--- a/lib/DateTime/Format/Duration.pm ++++ b/lib/DateTime/Format/Duration.pm +@@ -580,8 +580,8 @@ sub _build_parser { + + + # Any function in DateTime. +- $regex =~ s|%{(\w+)}|($tempdur->can($1)) ? "(.+)" : ".+"|eg; +- $field_list =~ s|(%{(\w+)})|($tempdur->can($2)) ? "#$2#" : $1 |eg; ++ $regex =~ s|%\{(\w+)}|($tempdur->can($1)) ? "(.+)" : ".+"|eg; ++ $field_list =~ s|(%\{(\w+)})|($tempdur->can($2)) ? "#$2#" : $1 |eg; + + # White space: + $regex =~ s/%(\d*)[tn]/($1) ? "\\s{$1}" : "\\s+"/eg; +-- +2.6.4 + diff -Nru libdatetime-format-duration-perl-1.03a/debian/patches/series libdatetime-format-duration-perl-1.03a/debian/patches/series --- libdatetime-format-duration-perl-1.03a/debian/patches/series 1970-01-01 02:00:00.000000000 +0200 +++ libdatetime-format-duration-perl-1.03a/debian/patches/series 2016-01-08 10:45:51.000000000 +0200 @@ -0,0 +1 @@ +0001-fix-regex-warning-in-perl-5.22.patch diff -Nru libdatetime-format-duration-perl-1.03a/debian/source/format libdatetime-format-duration-perl-1.03a/debian/source/format --- libdatetime-format-duration-perl-1.03a/debian/source/format 1970-01-01 02:00:00.000000000 +0200 +++ libdatetime-format-duration-perl-1.03a/debian/source/format 2016-01-08 10:50:10.000000000 +0200 @@ -0,0 +1 @@ +3.0 (quilt)