From: Guilhem Moulin Date: Fri, 24 Jul 2015 23:07:53 +0000 (+0200) Subject: Bugfix: allow the absence of default section in the config file. X-Git-Url: https://git.g-eek.se/?a=commitdiff_plain;h=7621ae954c8fcee1e1ad7a53735d20629f26bf83;p=interimap.git Bugfix: allow the absence of default section in the config file. --- diff --git a/lib/Net/IMAP/Sync.pm b/lib/Net/IMAP/Sync.pm index be083f3..c3af4fa 100644 --- a/lib/Net/IMAP/Sync.pm +++ b/lib/Net/IMAP/Sync.pm @@ -75,7 +75,7 @@ sub read_config($$%) { my %configs; foreach my $section (@$sections) { - my $conf = { %{$h->{_}} }; # default section + my $conf = defined $h->{_} ? { %{$h->{_}} } : {}; # default section $configs{$section} = $conf; next unless defined $section and $section ne '_';