Skip to content

Commit

Permalink
Fix comment in the block to call hook method #399
Browse files Browse the repository at this point in the history
  • Loading branch information
azumakuniyuki committed Jun 12, 2020
1 parent c7a4506 commit edebb92
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/Sisimai.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,16 @@ sub make {
my $sisi = [];

if( my $mesg = Sisimai::Message->new(%$args) ) {
# Sisimai::Message object was created successfull
# Sisimai::Message object was created successfully
$args = { 'data' => $mesg, 'delivered' => $argv1->{'delivered'}, 'origin' => $path };
$sisi = Sisimai::Data->make(%$args);
}

if( $c___ ) {
# Run the callback function specified with "c___" parameter of Sisimai->make
# after reading each email file in Maildir/ every time
eval {
$args = { 'kind' => $kind, 'mail' => \$r, 'path' => $path, 'sisi' => $sisi };
$c___->($args);
};
$args = { 'kind' => $kind, 'mail' => \$r, 'path' => $path, 'sisi' => $sisi };
eval { $c___->($args) };
warn sprintf(" ***warning: Something is wrong in hook method 'c___': %s", $@) if $@;
}
push @$list, @$sisi if scalar @$sisi;
Expand Down

0 comments on commit edebb92

Please sign in to comment.