equal
deleted
inserted
replaced
2606 ### |
2606 ### |
2607 sub save_config |
2607 sub save_config |
2608 { |
2608 { |
2609 my $confpath = shift; |
2609 my $confpath = shift; |
2610 |
2610 |
2611 my %conf2 = %$conf; |
2611 # This check is currently unnecessary because the comparison will always |
2612 if( $confpath eq $conf->{configfile}) { |
2612 # be true, but is left here for effect of least surprise in the future. |
2613 delete $conf2{'configfile'} |
2613 if( defined($conf->{'configfile'}) and ($confpath eq $conf->{'configfile'})) { |
2614 } |
2614 delete $conf->{'configfile'} |
2615 |
2615 } |
2616 YAML::Syck::DumpFile( $conf->{'configfile'}, \%conf2 ); |
2616 |
2617 chmod 0600, $conf->{'configfile'}; |
2617 YAML::Syck::DumpFile( $confpath, $conf ); |
|
2618 chmod 0600, $confpath; |
2618 |
2619 |
2619 return 1; |
2620 return 1; |
2620 } |
2621 } |
2621 |
2622 |
2622 ### EOF |
2623 ### EOF |