From 847ce3f06147edc314b420030b0d9239153c79a8 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 23 Jul 2015 15:47:10 +0200 Subject: bugfix --- lib/Net/IMAP/Sync.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Net') diff --git a/lib/Net/IMAP/Sync.pm b/lib/Net/IMAP/Sync.pm index b952546..ad7b2f5 100644 --- a/lib/Net/IMAP/Sync.pm +++ b/lib/Net/IMAP/Sync.pm @@ -321,7 +321,7 @@ sub new($%) { $self->fail("Logins are disabled.") if grep {$_ eq 'LOGINDISABLED'} @caps; my @mechs = grep defined, map { /^AUTH=(.+)/ ? $1 : undef } @caps; - my $mech = (grep defined, map {my $m = $_; grep {$m eq $_} @mechs ? $m : undef} + my $mech = (grep defined, map {my $m = $_; (grep {$m eq $_} @mechs) ? $m : undef} split(/ /, $self->{auth}))[0]; $self->fail("Failed to choose an authentication mechanism") unless defined $mech; @@ -847,7 +847,7 @@ sub pull_updates($) { # do that afterwards since the UID FETCH command above can produce VANISHED responses my %vanished = map {$_ => 1} @{$self->{_VANISHED}}; - my @vanished = keys %vanished; + @vanished = keys %vanished; $self->{_VANISHED} = []; # ignore FLAG updates on VANISHED messages -- cgit v1.2.3