]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Escape left brace as new perl suggests
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 14 Jul 2015 12:14:30 +0000 (14:14 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 20 Jul 2015 08:35:18 +0000 (10:35 +0200)
After upgrade to perl-5.22.0, it started complaining about one of our
scripts.  The thing is that even though it works, it wants all curly
brackets escaped properly.  The change is not functional, it merely gets
rid of the following error:

  Unescaped left brace in regex is deprecated, passed through in regex;
  marked by <-- HERE in m/^enum { <-- HERE / at -e line 3.

There is one more error like this that I'm getting, but it is because of
GNU automake bug #21001:

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21001

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/Makefile.am

index be63e26abe2fc251013c048785877287af7c3020..7338ab95c6ee74ddfab3177c597beca9c08af2e8 100644 (file)
@@ -451,7 +451,7 @@ PDWTAGS = \
            $(PERL) -0777 -n                                            \
                -e 'foreach my $$p (split m!\n*(?:$(r1)|$(r2))\n!) {'   \
                -e '  if ($$p =~ /^(struct|enum) $(struct_prefix)/ ||'  \
-               -e '      $$p =~ /^enum {/) {'                          \
+               -e '      $$p =~ /^enum \{/) {'                         \
                -e '    $$p =~ s!\t*/\*.*?\*/!!sg;'                     \
                -e '    $$p =~ s!\s+\n!\n!sg;'                          \
                -e '    $$p =~ s!\s+$$!!;'                              \