]> iEval git - nethack-naodash.git/commitdiff
Appease perlcritic
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 22 Aug 2015 19:41:13 +0000 (22:41 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 22 Aug 2015 19:41:13 +0000 (22:41 +0300)
lib/NetHack/NAOdash.pm

index 92f17ef6d2a79e408b845dd80d15ec031d14f132..c9e376f28c1bd3f45de0296bb74f04b5cd8eaed2 100644 (file)
@@ -126,7 +126,7 @@ sub _get_xlog {
        my $dir = $ENV{NAODASH_CACHE} || catdir tmpdir, 'naodash';
        mkdir $dir or die "Cannot create cache directory: $!\n" unless -d $dir;
        my $file = catfile $dir, $name;
-       write_file $file, _get_xlog_from_server $name unless -f $file && time - (stat $file)[9] < 86400;
+       write_file $file, _get_xlog_from_server $name if ! -f $file || time - (stat $file)[9] >= 86_400;
        scalar read_file $file
 }
 
This page took 0.018035 seconds and 4 git commands to generate.