Skip Menu |

This queue is for tickets about the MP3-Tag CPAN distribution.

Report information
The Basics
Id: 105165
Status: open
Priority: 0/
Queue: MP3-Tag

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
shimada_d [...] yahoo.co.jp
SMYLERS [...] cpan.fsck.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.14



Subject: Unescaped left brace in regex is deprecated, passed through in regex on Perl 5.22.0
Date: Thu, 11 Jun 2015 10:57:38 +0900
To: <bug-MP3-Tag [...] rt.cpan.org>
From: <shimada_d [...] yahoo.co.jp>
Hi. Perl may accept stricter regex syntax since Perl 5.21 than former Perl version. When I used MP3::Tag 1.13 for Strawberry Perl 5.22.0.1 for Windows, I found error message following. Show quoted text
> Unescaped left brace in regex is deprecated, passed through in regex; > marked by <-- HERE in m/(\\%(?:\\=)?(\w|\\{ <-- HERE (?:\w|\\[^\w\\{}]|\\\\\\[\\{}])*\\}|\\\W))/ > at C:/Strawberry/perl/site/lib/MP3/Tag.pm line 2611.
Thank you.
Subject: Re: [Patch] Unescaped left brace in regex is deprecated, passed through in regex on Perl 5.22.0
A year ago shimada_d@yahoo.co.jp wrote: Show quoted text
> Perl may accept stricter regex syntax ... Perl 5.22.0.1, I > found error message following. >
> > Unescaped left brace in regex is deprecated, passed through in regex; > > marked by <-- HERE in m/(\\%(?:\\=)?(\w|\\{ <-- HERE > > (?:\w|\\[^\w\\{}]|\\\\\\[\\{}])*\\}|\\\W))/ > > at C:/Strawberry/perl/site/lib/MP3/Tag.pm line 2611.
As of PerlĀ 5.25.1 it's now a failure, rather than a deprecation warning: Unescaped left brace in regex is illegal in regex; marked by <-- HERE in m/(\\%(?:\\=)?(\w|\\{ <-- HERE (?:\w|\\[^\w\\{}]|\\\\\\[\\{}])*\\}|\\\W))/ at lib/MP3/Tag.pm line 2611. The attached patch fixes this, escaping the literal braces in that line (thereby increasing the number of backslashes in the line from 26 to 28). Ilya, are you interested in making a new release with this patch? If not, would you mind somebody else doing so? Thanks. Smylers
Subject: escape_brace.patch
--- lib/MP3/Tag.pm 2010-07-13 15:10:38.000000000 +0100 +++ blib/lib/MP3/Tag.pm 2016-06-21 09:51:07.518256104 +0100 @@ -2607,7 +2607,7 @@ my ($self, $pattern) = @_; $pattern = "^\Q$pattern\E\$"; # unquote %. and %=. and %={WHATEVER} and %{WHATEVER} - $pattern =~ s<(\\%(?:\\=)?(\w|\\{(?:\w|\\[^\w\\{}]|\\\\\\[\\{}])*\\}|\\\W))> + $pattern =~ s<(\\%(?:\\=)?(\w|\\\{(?:\w|\\[^\w\\{}]|\\\\\\[\\{}])*\\\}|\\\W))> ( __unquote($1) )ge; # $pattern =~ s/(\\%(?:\\=)?)(\w|\\(\W))/$unquote{$1}$+/g; return $self->parse_rex_prepare($pattern);
Are there any plans for a new release that includes that fix already? I'd really love to see that fixed... Anything I can do to support?
This looks be fixed in 1.14

-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
From: jim.avera [...] gmail.com
Can the author please close the issue if it is fixed?
It seems 5.28 found some additional instances of this happening: 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/^\??({ <-- HERE ([^{}]+)}|.)/ at C:\STRAWB~1\cpan\build\MP3-Tag-1.14-1\blib\lib/MP3/Tag.pm line 3080. 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/^({ <-- HERE [^{}]+}|\w)/ at C:\STRAWB~1\cpan\build\MP3-Tag-1.14-1\blib\lib/MP3/Tag.pm line 3092. I've got a branch here that fixes that: https://github.com/wchristian/MP3-Tag/tree/deprecation_fix