]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiToMail.pm
lei_to_mail: get rid of empty _post_augment_maildir
[public-inbox.git] / lib / PublicInbox / LeiToMail.pm
index b90756aee4584c8a1dbea87be4e4e15bde75df70..e89cca712e17ab7098d9404f17d313d6b4ef8dff 100644 (file)
@@ -394,8 +394,6 @@ sub _do_augment_maildir {
        }
 }
 
-sub _post_augment_maildir {} # noop
-
 sub _pre_augment_mbox {
        my ($self, $lei) = @_;
        my $dst = $lei->{ovv}->{dst};
@@ -441,8 +439,8 @@ sub _do_augment_mbox {
 sub pre_augment { # fast (1 disk seek), runs in same process as post_augment
        my ($self, $lei) = @_;
        # _pre_augment_maildir, _pre_augment_mbox
-       my $m = "_pre_augment_$self->{base_type}";
-       $self->$m($lei);
+       my $m = $self->can("_pre_augment_$self->{base_type}") or return;
+       $m->($self, $lei);
 }
 
 sub do_augment { # slow, runs in wq worker
@@ -455,9 +453,9 @@ sub do_augment { # slow, runs in wq worker
 # fast (spawn compressor or mkdir), runs in same process as pre_augment
 sub post_augment {
        my ($self, $lei, @args) = @_;
-       # _post_augment_maildir, _post_augment_mbox
-       my $m = "_post_augment_$self->{base_type}";
-       $self->$m($lei, @args);
+       # _post_augment_mbox
+       my $m = $self->can("_post_augment_$self->{base_type}") or return;
+       $m->($self, $lei, @args);
 }
 
 sub ipc_atfork_child {