Skip to content

Commit

Permalink
Tiny variables improvement #399
Browse files Browse the repository at this point in the history
  • Loading branch information
azumakuniyuki committed Jul 16, 2020
1 parent a15f5f2 commit 55e6912
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Sisimai.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ sub make {

my $list = [];
my $mail = Sisimai::Mail->new($argv0) || return undef;
my $kind = $mail->kind;
my $c___ = ref $argv1->{'c___'} eq 'CODE' ? $argv1->{'c___'} : undef;

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

0 comments on commit 55e6912

Please sign in to comment.