Skip Menu |

This queue is for tickets about the Text-FindIndent CPAN distribution.

Report information
The Basics
Id: 105321
Status: resolved
Priority: 0/
Queue: Text-FindIndent

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.10
Fixed in: 0.11



Subject: perl-5.22 warns about unescaped curly bracket
$ perl -e 'require Text::FindIndent' Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/=> { <-- HERE $/ at /usr/share/perl5/vendor_perl/Text/FindIndent.pm line 122. The code is: if ($rest=~/=> {$/) { #handle case where hash keys and values are indented by braces pos + 1
From: ppisar [...] redhat.com
Dne Čt 18.čen.2015 02:39:11, ppisar napsal(a): Show quoted text
> $ perl -e 'require Text::FindIndent' > Unescaped left brace in regex is deprecated, passed through in regex; > marked by <-- HERE in m/=> { <-- HERE $/ at > /usr/share/perl5/vendor_perl/Text/FindIndent.pm line 122. >
Fix is attached.
Subject: Text-FindIndent-0.10-Escape-a-curly-bracket-in-a-regualar-expression.patch
From 63339c0378a0f78fa7402e7fd8274ee279f59187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Thu, 18 Jun 2015 08:43:52 +0200 Subject: [PATCH] Escape a curly bracket in a regualar expression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Perl 5.22 warns on uneven literal currly brackates in regular expressions. Simple reproducer is to compile the Text::FindIndent module. This patch fixes it. CPAN RT#105321 Signed-off-by: Petr Písař <ppisar@redhat.com> --- lib/Text/FindIndent.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Text/FindIndent.pm b/lib/Text/FindIndent.pm index d13932c..9b985e0 100644 --- a/lib/Text/FindIndent.pm +++ b/lib/Text/FindIndent.pm @@ -119,7 +119,7 @@ sub parse { } $next_line_braces_pos_plus_1=0; } else { - if ($rest=~/=> {$/) { #handle case where hash keys and values are indented by braces pos + 1 + if ($rest=~/=> \{$/) { #handle case where hash keys and values are indented by braces pos + 1 $next_line_braces_pos_plus_1=_length_with_tabs_converted($ws)+length($rest); } } -- 2.1.0