From 3d84f865c91d1c3ffc48b9eecfbdfb6a06291250 Mon Sep 17 00:00:00 2001 From: Jesse Michael Date: Fri, 30 Mar 2007 16:04:04 +0000 Subject: [PATCH] The version of perl included with Ubuntu's Feisty release is generating extra perl warnings about using an uninitialized value in a pattern match when the user uses the arrow keys to move up and down in the option list when asking how to handle path access rules. This makes sure the variables used in m// operations are always defined. --- utils/SubDomain.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/SubDomain.pm b/utils/SubDomain.pm index ba01b4458..ee5f30fab 100755 --- a/utils/SubDomain.pm +++ b/utils/SubDomain.pm @@ -3273,11 +3273,6 @@ sub Text_PromptUser ($) { # get their input... $ans = lc(getkey); - if ($ans && $keys{$ans} && $keys{$ans} eq "CMD_HELP") { - print "\n$helptext\n"; - $ans = undef; - } - # pick the default if they hit return... $ans = $default_key if ord($ans) == 10; @@ -3317,7 +3312,12 @@ sub Text_PromptUser ($) { if ($ans > 0 && $ans <= scalar(@$options)) { $selected = $ans - 1; } - $ans = undef; + $ans = "again"; + } + + if ($keys{$ans} && $keys{$ans} eq "CMD_HELP") { + print "\n$helptext\n"; + $ans = "again"; } }