Subject: | patch for fixing unescaped brackets in MP3::Tag |
Howdy!
Currently it throws the errors below.
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 /usr/local/lib/perl5/site_perl/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 /usr/local/lib/perl5/site_perl/MP3/Tag.pm line 3092.
The attached patch escapes the brackets in the regexp.
Subject: | mp3-tag.diff |
--- lib/MP3/Tag.pm.orig 2018-12-30 03:48:53.420431000 -0600
+++ lib/MP3/Tag.pm 2018-12-30 03:50:28.362899000 -0600
@@ -3077,7 +3077,7 @@
local $self->{ms} = int($time * 1000 + 0.5) if defined $time;
my ($out, %have, $c) = '';
for my $f (@_) {
- $have{$+}++ if $f =~ /^\??({([^{}]+)}|.)/;
+ $have{$+}++ if $f =~ /^\??(\{([^\{\}]+)\}|.)/;
}
for my $f (@_) {
if (!$c++ and $f =~ /^=>(\w)$/) {
@@ -3089,7 +3089,7 @@
}
my $ff = $f; # Modifiable
my $opt = ($ff =~ s/^\?//);
- $ff =~ s/^({[^{}]+}|\w)// or die "unexpected time format: <<$f>>";
+ $ff =~ s/^(\{[^\{\}]+\}|\w)// or die "unexpected time format: <<$f>>";
my ($what, $format) = ($1, '');
if ($opt) {
if ($what eq 'H') {