X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FApp%2FLastmsg.pm;fp=lib%2FApp%2FLastmsg.pm;h=40a3e8a4b89d06c692ef0e62da9e4af92400760e;hb=8dffa80bd13da3bedacff245a20f896ee9ceb602;hp=07f71db434c4789cceab6035c054527780f5f4ed;hpb=45e63402a29d03e13babf2d8937b98047df14bfc;p=app-lastmsg.git diff --git a/lib/App/Lastmsg.pm b/lib/App/Lastmsg.pm index 07f71db..40a3e8a 100644 --- a/lib/App/Lastmsg.pm +++ b/lib/App/Lastmsg.pm @@ -65,9 +65,8 @@ sub run { my ($from) = grep { /^from$/i } $msg->header_names; $from = $msg->header_raw($from); if ($ENV{LASTMSG_DEBUG}) { - my $mid = grep { /^message-id$/i } $msg->header_names; - say STDERR 'Processing ', $msg->header_raw('Message-ID'), - " from $from" if $ENV{LASTMSG_DEBUG}; + my ($mid) = grep { /^message-id$/i } $msg->header_names; + say STDERR 'Processing ', $msg->header_raw($mid), " from $from"; } $process_message->($msg, $from); } @@ -84,9 +83,9 @@ sub run { @people = (@people, split /,/, $msg->header_raw($hdr)); } if ($ENV{LASTMSG_DEBUG}) { - my $mid = grep { /^message-id$/i } $msg->header_names; + my ($mid) = grep { /^message-id$/i } $msg->header_names; say STDERR 'Processing ', $msg->header_raw($mid), - ' sent to ', join ',', @people if $ENV{LASTMSG_DEBUG}; + ' sent to ', join ',', @people; } $process_message->($msg, @people); }