X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FApp%2FLastmsg.pm;h=e4b406271a831eddb2eade6ad98a8a322424670c;hb=refs%2Ftags%2F0.002001;hp=07f71db434c4789cceab6035c054527780f5f4ed;hpb=45e63402a29d03e13babf2d8937b98047df14bfc;p=app-lastmsg.git diff --git a/lib/App/Lastmsg.pm b/lib/App/Lastmsg.pm index 07f71db..e4b4062 100644 --- a/lib/App/Lastmsg.pm +++ b/lib/App/Lastmsg.pm @@ -12,7 +12,7 @@ use List::Util qw/max/; use POSIX qw/strftime/; our $OUTPUT_FILEHANDLE = \*STDOUT; -our $VERSION = '0.001002'; +our $VERSION = '0.002001'; our @DEFAULT_INBOX; push @DEFAULT_INBOX, "/var/mail/$ENV{USER}" if exists $ENV{USER}; @@ -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); } @@ -134,7 +133,7 @@ Marius Gavrilescu, Emarius@ieval.roE =head1 COPYRIGHT AND LICENSE -Copyright (C) 2016 by Marius Gavrilescu +Copyright (C) 2016-2017 by Marius Gavrilescu This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.1 or,