summaryrefslogtreecommitdiff
path: root/lib/MaildirIndexer/Email.rakumod
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MaildirIndexer/Email.rakumod')
-rw-r--r--lib/MaildirIndexer/Email.rakumod8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/MaildirIndexer/Email.rakumod b/lib/MaildirIndexer/Email.rakumod
index aabf185..4f92106 100644
--- a/lib/MaildirIndexer/Email.rakumod
+++ b/lib/MaildirIndexer/Email.rakumod
@@ -18,9 +18,11 @@ method refs(--> Iterable) {
multi split-refs(Any --> Iterable) { return () }
multi split-refs(Str:D $str --> Iterable) {
+ my @result;
MaildirIndexer::LogTimelineSchema::Parse::Header.log: {
- return $/<refs>».Str if $str ~~ m{'<' $<refs> = (<-[<>]>+)+ % [ '>' .*? '<' ] '>' };
+ @result = $/<refs>».Str if $str ~~ m{'<' $<refs> = (<-[<>]>+)+ % [ '>' .*? '<' ] '>' };
}
+ return @result;
}
method addresses (--> Iterable) {
@@ -57,9 +59,11 @@ my grammar Address {
multi sub extract-addresses(Any --> Iterable) { return () }
multi sub extract-addresses(Str:D $str --> Iterable) {
+ my @result;
MaildirIndexer::LogTimelineSchema::Parse::Header.log: {
with Address.parse($str) {
- return $_<addr>».Str;
+ @result = $_<addr>».Str;
}
}
+ return @result;
}