From 6171cb0d7fe0ac8f6352b8d3b9b87d56c56cf791 Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 26 Dec 2019 20:13:58 +0000 Subject: restructure store, extract server now Store has a set of Index, which actually do the indexing Store also runs the scan-dir (this may not be ideal, but will do for now) Server handles I/O --- lib/MaildirIndexer/Email.pm6 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/MaildirIndexer/Email.pm6') diff --git a/lib/MaildirIndexer/Email.pm6 b/lib/MaildirIndexer/Email.pm6 index 993d8b1..0cd5bd7 100644 --- a/lib/MaildirIndexer/Email.pm6 +++ b/lib/MaildirIndexer/Email.pm6 @@ -1,10 +1,11 @@ use v6.d.PREVIEW; unit class MaildirIndexer::Email; +has IO $!path; has %!headers; has $!body; -method BUILD(:%!headers,:$!body) { } +method BUILD(:%!headers,:$!body,:$!path = IO) { } method message-id { split-refs(%!headers)[0] // '' } method refs { -- cgit v1.2.3