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

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



On Thu, 2015-11-19 at 08:43 +0000, Olaf Hering wrote:
> 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.

They aren't quite equivalent, but [A-Z] suffices for the usage here.

> Â[ Upstream commit ce8155f7a3d59ce868ea16d8891edda4d865e873 ]
> 
> Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

Acked + applied.

> 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®.