From: Eric Wong Date: Tue, 15 Apr 2014 01:03:55 +0000 (+0000) Subject: extractor: clarify naming for message delivery X-Git-Tag: v0.0.0~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6bcb01299005a0adce0c7a451d83193b53315e38;p=ssoma-mda.git extractor: clarify naming for message delivery We'll be supporting multiple refs --- diff --git a/lib/Ssoma/Extractor.pm b/lib/Ssoma/Extractor.pm index afe45ce..2589adb 100644 --- a/lib/Ssoma/Extractor.pm +++ b/lib/Ssoma/Extractor.pm @@ -72,11 +72,11 @@ sub _extract { "only one of $pkey, $ckey, or $ikey may be defined in $state\n"; if (defined $command) { - $self->_run_for_each($command, $tip, $new) + $self->_run_for_each_msg($command, $tip, $new) } elsif (defined $path) { - $self->_deliver_each($path, $tip, $new); + $self->_deliver_each_msg($path, $tip, $new); } elsif (defined $imap) { - $self->_imap_deliver_each($tip, $new); + $self->_imap_deliver_each_msg($tip, $new); } else { die "neither $pkey, $ckey, nor $ikey are defined in $state\n"; } @@ -93,7 +93,7 @@ sub _extract { # folder (via Email::FolderType) via trailing trailing slash for maildir # (and lack of trailing slash for mbox). Ezmlm and MH formats are not # currently supported by Email::LocalDelivery. -sub _deliver_each { +sub _deliver_each_msg { my ($self, $dest, $tip, $new) = @_; my $git = $self->{git}; foreach my $path (@$new) { @@ -103,7 +103,7 @@ sub _deliver_each { # just pipe the blob message to $command, bypassing Perl, # so there's no validation at all -sub _run_for_each { +sub _run_for_each_msg { my ($self, $command, $tip, $new) = @_; my $git = $self->{git}; foreach my $path (@$new) { @@ -113,7 +113,7 @@ sub _run_for_each { } } -sub _imap_deliver_each { +sub _imap_deliver_each_msg { my ($self, $tip, $new) = @_; my $git = $self->{git}; require Ssoma::IMAP;