From ede995e0075092ca9b763713d60eb71105b5521e Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 17 Sep 2003 19:25:59 +0000 Subject: (comment_directive) fix it --- perl-install/handle_configs.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'perl-install/handle_configs.pm') diff --git a/perl-install/handle_configs.pm b/perl-install/handle_configs.pm index 669c434b0..7d6e5c6e9 100644 --- a/perl-install/handle_configs.pm +++ b/perl-install/handle_configs.pm @@ -77,11 +77,12 @@ sub comment_directive { my ($lines_ptr, $directive, $exactmatch) = @_; + my $success = 0; my $searchdirective = searchstr($directive); $searchdirective .= ".*" if !$exactmatch; - (s/^\s*($searchdirective)$/#$1/ and return 1) + (s/^\s*($searchdirective)$/#$1/ and $success = 1) foreach @$lines_ptr; - return 0; + return $success; } sub replace_directive { -- cgit v1.2.1