From 12e45f6e461696131b8950245ac26f1dc7fb5573 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 17 Jul 2018 18:18:40 +0200 Subject: ImapNotify: Move logging statement to fix undefined $+ s///r still changes $+ which results in undefined values for $mailbox and $uid. Signed-off-by: Florian Pritz --- lib/App/ImapNotify.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/App/ImapNotify.pm b/lib/App/ImapNotify.pm index 1445c13..e7aba6f 100644 --- a/lib/App/ImapNotify.pm +++ b/lib/App/ImapNotify.pm @@ -72,9 +72,9 @@ method loop() { next; } if ($line =~ m/^\* STATUS (?[^ ]+) \(MESSAGES \d+ UIDNEXT (?\d+) UNSEEN \d+\)/) { - $log->debugf("Got status change: '%s'", $line =~ s/\r\n$//r); my $mailbox = $+{mailbox}; my $uid = $+{uidnext} - 1; + $log->debugf("Got status change: '%s'", $line =~ s/\r\n$//r); #$imap2->select($mailbox); #my $message = $imap2->send_command("uid fetch $uid (body.peek[header.fields (from to subject)])"); $imap->select($mailbox); -- cgit v1.2.3-24-g4f1b