From 2ef6db90f4c95bd6ad0792eb0867a966b8ff2b2e Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 21 Feb 2011 15:41:01 +0100 Subject: [PATCH] regress: fix add_attribute() function in perl lib --- regress/scripts/functions.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regress/scripts/functions.pm b/regress/scripts/functions.pm index 9fb4416cde..46f0a69e23 100644 --- a/regress/scripts/functions.pm +++ b/regress/scripts/functions.pm @@ -388,7 +388,7 @@ sub add_attribute $done=0; } - if ($l =~ /\Q$attr\E/i) { + if ($l =~ /^\s*\Q$attr\E/i) { if (!$obj || $cur_obj eq $obj) { if (!$name || $cur_name eq $name) { $l =~ s/\Q$attr\E\s*=\s*.+/$attr = $value/ig; @@ -397,7 +397,7 @@ sub add_attribute } } - if ($l =~ /Name\s*=\s*"?([\w\d\.-]+)"?/i) { + if ($l =~ /^\s*Name\s*=\s*"?([\w\d\.-]+)"?/i) { $cur_name = $1; } -- 2.39.5