[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] get_maintainer: fix perl 5.22/5.24 deprecated/incompatible "\C" use



From: Joe Perches <joe@xxxxxxxxxxx>

Perl 5.22 emits a deprecated message when "\C" is used in a regex.  Perl
5.24 will disallow it altogether.

Fix it by using [A-Z] instead of \C.

 [ Upstream commit ce8155f7a3d59ce868ea16d8891edda4d865e873 ]

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Keir Fraser <keir@xxxxxxx>
Cc: Tim Deegan <tim@xxxxxxx>
---
 scripts/get_maintainer.pl | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index cc445cd..9fda278 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -277,7 +277,7 @@ open (my $maint, '<', "${xen_path}MAINTAINERS")
 while (<$maint>) {
     my $line = $_;
 
-    if ($line =~ m/^(\C):\s*(.*)/) {
+    if ($line =~ m/^([A-Z]):\s*(.*)/) {
        my $type = $1;
        my $value = $2;
 
@@ -512,7 +512,7 @@ sub range_is_maintained {
 
     for (my $i = $start; $i < $end; $i++) {
        my $line = $typevalue[$i];
-       if ($line =~ m/^(\C):\s*(.*)/) {
+       if ($line =~ m/^([A-Z]):\s*(.*)/) {
            my $type = $1;
            my $value = $2;
            if ($type eq 'S') {
@@ -530,7 +530,7 @@ sub range_has_maintainer {
 
     for (my $i = $start; $i < $end; $i++) {
        my $line = $typevalue[$i];
-       if ($line =~ m/^(\C):\s*(.*)/) {
+       if ($line =~ m/^([A-Z]):\s*(.*)/) {
            my $type = $1;
            my $value = $2;
            if ($type eq 'M') {
@@ -579,7 +579,7 @@ sub get_maintainers {
 
            for ($i = $start; $i < $end; $i++) {
                my $line = $typevalue[$i];
-               if ($line =~ m/^(\C):\s*(.*)/) {
+               if ($line =~ m/^([A-Z]):\s*(.*)/) {
                    my $type = $1;
                    my $value = $2;
                    if ($type eq 'X') {
@@ -594,7 +594,7 @@ sub get_maintainers {
            if (!$exclude) {
                for ($i = $start; $i < $end; $i++) {
                    my $line = $typevalue[$i];
-                   if ($line =~ m/^(\C):\s*(.*)/) {
+                   if ($line =~ m/^([A-Z]):\s*(.*)/) {
                        my $type = $1;
                        my $value = $2;
                        if ($type eq 'F') {
@@ -897,7 +897,7 @@ sub find_first_section {
 
     while ($index < @typevalue) {
        my $tv = $typevalue[$index];
-       if (($tv =~ m/^(\C):\s*(.*)/)) {
+       if (($tv =~ m/^([A-Z]):\s*(.*)/)) {
            last;
        }
        $index++;
@@ -911,7 +911,7 @@ sub find_starting_index {
 
     while ($index > 0) {
        my $tv = $typevalue[$index];
-       if (!($tv =~ m/^(\C):\s*(.*)/)) {
+       if (!($tv =~ m/^([A-Z]):\s*(.*)/)) {
            last;
        }
        $index--;
@@ -925,7 +925,7 @@ sub find_ending_index {
 
     while ($index < @typevalue) {
        my $tv = $typevalue[$index];
-       if (!($tv =~ m/^(\C):\s*(.*)/)) {
+       if (!($tv =~ m/^([A-Z]):\s*(.*)/)) {
            last;
        }
        $index++;
@@ -951,7 +951,7 @@ sub get_maintainer_role {
 
     for ($i = $start + 1; $i < $end; $i++) {
        my $tv = $typevalue[$i];
-       if ($tv =~ m/^(\C):\s*(.*)/) {
+       if ($tv =~ m/^([A-Z]):\s*(.*)/) {
            my $ptype = $1;
            my $pvalue = $2;
            if ($ptype eq "S") {
@@ -1010,7 +1010,7 @@ sub add_categories {
 
     for ($i = $start + 1; $i < $end; $i++) {
        my $tv = $typevalue[$i];
-       if ($tv =~ m/^(\C):\s*(.*)/) {
+       if ($tv =~ m/^([A-Z]):\s*(.*)/) {
            my $ptype = $1;
            my $pvalue = $2;
            if ($ptype eq "L") {
@@ -1052,7 +1052,7 @@ sub add_categories {
                if ($name eq "") {
                    if ($i > 0) {
                        my $tv = $typevalue[$i - 1];
-                       if ($tv =~ m/^(\C):\s*(.*)/) {
+                       if ($tv =~ m/^([A-Z]):\s*(.*)/) {
                            if ($1 eq "P") {
                                $name = $2;
                                $pvalue = format_email($name, $address, 
$email_usename);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.