View | Details | Raw Unified | Return to bug 7613
Collapse All | Expand All

(-)a/misc/bin/connexion_import_daemon.pl (-4 / +3 lines)
Lines 112-122 sub parse_config { Link Here
112
112
113
    my $config_file = $self->{config_file};
113
    my $config_file = $self->{config_file};
114
114
115
    open CONF, $config_file or die "Cannot open config file $config: $!";
115
    open (my $conf_fh, '<', $config_file) or die "Cannot open config file $config: $!";
116
116
117
    my %param;
117
    my %param;
118
    my $line = 0;
118
    my $line = 0;
119
    while (<CONF>) {
119
    while (<$conf_fh>) {
120
        $line++;
120
        $line++;
121
        chomp;
121
        chomp;
122
        s/\s*#.*//o; # remove comments
122
        s/\s*#.*//o; # remove comments
Lines 145-151 sub parse_config { Link Here
145
    my $log_fh;
145
    my $log_fh;
146
    close $self->{log_fh} if $self->{log_fh};
146
    close $self->{log_fh} if $self->{log_fh};
147
    if (my $logfile = delete $param{log}) {
147
    if (my $logfile = delete $param{log}) {
148
        open $log_fh, ">>$logfile" or die "Cannot open $logfile for write: $!";
148
        open ($log_fh, '>>', $logfile) or die "Cannot open $logfile for write: $!";
149
    } else {
149
    } else {
150
        $log_fh = \*STDERR;
150
        $log_fh = \*STDERR;
151
    }
151
    }
152
- 

Return to bug 7613