summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-07-17 18:18:40 +0200
committerFlorian Pritz <bluewind@xinu.at>2018-07-17 18:18:40 +0200
commit12e45f6e461696131b8950245ac26f1dc7fb5573 (patch)
tree28c398ba86787ea643bc428c61e4b9069d788d27 /lib
parentf05b01c2cd283e7d24fe8fe51977355839617e4f (diff)
downloadApp-ImapNotify-12e45f6e461696131b8950245ac26f1dc7fb5573.tar.gz
App-ImapNotify-12e45f6e461696131b8950245ac26f1dc7fb5573.tar.xz
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 <bluewind@xinu.at>
Diffstat (limited to 'lib')
-rw-r--r--lib/App/ImapNotify.pm2
1 files changed, 1 insertions, 1 deletions
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 (?<mailbox>[^ ]+) \(MESSAGES \d+ UIDNEXT (?<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);