]> iEval git - app-lastmsg.git/blobdiff - lib/App/Lastmsg.pm
Prevent warnings on systems without $ENV{HOME} / $ENV{USER}
[app-lastmsg.git] / lib / App / Lastmsg.pm
index 827cd364fef6365540cf428c09770b20ff1b4bd8..a5a27b59c42af9fea88cebcfee4c86d870469561 100644 (file)
@@ -12,12 +12,11 @@ use List::Util qw/max/;
 use POSIX qw/strftime/;
 
 our $OUTPUT_FILEHANDLE = \*STDOUT;
-our $VERSION = '0.001';
+our $VERSION = '0.001002';
 
-our @DEFAULT_INBOX = (
-       "/var/mail/$ENV{USER}",
-       "$ENV{HOME}/Maildir/",
-);
+our @DEFAULT_INBOX;
+push @DEFAULT_INBOX, "/var/mail/$ENV{USER}" if exists $ENV{USER};
+push @DEFAULT_INBOX, "$ENV{HOME}/Maildir"   if exists $ENV{HOME};
 
 sub run {
        my $config = Config::Auto->new(format => 'yaml')->parse;
This page took 0.017636 seconds and 4 git commands to generate.