Testsuite failure with new Perl

Pavel Raiskup <[email protected]>
Newsgroups gmane.comp.sysutils.automake.patches,gmane.comp.sysutils.automake.bugs
Message-ID <[email protected]>
Based on build failure in Fedora 23 [1], automake has some testsuite
failures against newer perl (currently Perl v5.22).  Its because of new
Perl warning:

  $ automake
  Unescaped left brace in regex is deprecated, passed through in regex;
  marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at
  /usr/bin/automake line 3936.

Please consider the attached patch.

[1] https://bugzilla.redhat.com/attachment.cgi?id=1046458
Pavel
0001-bin-automake-escape-in-regexp-pattern.patch (text/x-patch, 1.1 KB)
From 34163794a58b5bd91c5d6bd9adf5437571c7a479 Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <[email protected]>
Date: Tue, 7 Jul 2015 10:54:24 +0200
Subject: [PATCH] bin/automake: escape '{' in regexp pattern

Based on perlre(1) documentation:
.. in Perl v5.26, literal uses of a curly bracket will be required
to be escaped, say by preceding them with a backslash ("\{" ) or
enclosing them within square brackets ("[{]") ..

References:
https://bugzilla.redhat.com/1239379

* bin/automake.in (substitute_ac_subst_variables): Escape the
occurrence of '{' character.
---
 bin/automake.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/automake.in b/bin/automake.in
index 0c29184..c294ced 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -3898,7 +3898,7 @@ sub substitute_ac_subst_variables_worker
 sub substitute_ac_subst_variables
 {
   my ($text) = @_;
-  $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
+  $text =~ s/\$\{([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
   return $text;
 }
 
-- 
2.1.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.