summaryrefslogtreecommitdiffstats
path: root/perl-install/handle_configs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/handle_configs.pm')
-rw-r--r--perl-install/handle_configs.pm16
1 files changed, 6 insertions, 10 deletions
diff --git a/perl-install/handle_configs.pm b/perl-install/handle_configs.pm
index 185d45b38..df817aac0 100644
--- a/perl-install/handle_configs.pm
+++ b/perl-install/handle_configs.pm
@@ -129,12 +129,13 @@ sub set_directive {
# Set a directive, replace the old definition or a commented definition
- my ($lines_ptr, $directive) = @_;
+ my ($lines_ptr, $directive, $full_line) = @_;
- my $searchdirective = searchstr($directive);
- my $olddirective = $searchdirective;
- $olddirective =~ s/^\s*(\S+)\s+.*$/$1/s;
- $olddirective ||= $directive;
+ my $olddirective = $directive;
+ if (!$full_line) {
+ $olddirective =~ s/^\s*(\S+)\s+.*$/$1/s;
+ $olddirective ||= $directive;
+ }
my $success = (replace_directive($lines_ptr, $olddirective,
$directive) or
@@ -152,11 +153,6 @@ sub add_directive {
my ($lines_ptr, $directive) = @_;
- my $searchdirective = searchstr($directive);
- my $olddirective = $searchdirective;
- $olddirective =~ s/^\s*(\S+)\s+.*$/$1/s;
- $olddirective ||= $directive;
-
my $success = insert_directive($lines_ptr, $directive);
if ($success) {
move_directive_to_version_commented_out($lines_ptr, $directive,