1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Description: fix regexp warning with perl 5.28
Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/\A((?![ ]*({ <-- HERE |\n)|.*?\S.*?\t.*?\S).*?\S.*\n)/ at lib/Getopt/Declare.pm line 651.
Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32), passed through in regex; marked by <-- HERE in m/\A((?![ ]*({ <-- HERE |\n)|.*?\S.*?\t.*?\S).*?\S.*\n)/ at lib/Getopt/Declare.pm line 1072.
Origin: vendor
Bug-Debian: https://bugs.debian.org/903323
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2018-07-08
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=125797
Bug: https://rt.cpan.org/Ticket/Display.html?id=125797
--- a/lib/Getopt/Declare.pm
+++ b/lib/Getopt/Declare.pm
@@ -648,7 +648,7 @@
my $ditto;
$_strict ||= $desc =~ /\Q[strict]/;
- $desc .= $1 while s/\A((?![ ]*({|\n)|.*?\S.*?\t.*?\S).*?\S.*\n)//;
+ $desc .= $1 while s/\A((?![ ]*(\{|\n)|.*?\S.*?\t.*?\S).*?\S.*\n)//;
$_lastdesc and $desc =~ s/\A\s*\[\s*ditto\s*\]/$_lastdesc/
and $ditto = 1;
@@ -1069,7 +1069,7 @@
my ($desc) = expand $2;
$desc .= (expand $1)[0]
- while s/\A((?![ ]*({|\n)|.*?\S.*?\t.*?\S).*?\S.*\n)//;
+ while s/\A((?![ ]*(\{|\n)|.*?\S.*?\t.*?\S).*?\S.*\n)//;
# Skip parameters with the special directive [undocumented]
next if $desc =~ /\[\s*undocumented\s*\]/i;
|