lib/CrashTest/Storage/FileSystem.pm
changeset 44 a5c677eb8329
parent 34 e0d6597078a5
child 54 2218a127abd9
--- a/lib/CrashTest/Storage/FileSystem.pm	Tue Aug 19 23:51:31 2014 +0200
+++ b/lib/CrashTest/Storage/FileSystem.pm	Tue Aug 19 23:58:29 2014 +0200
@@ -51,8 +51,8 @@
     }
     closedir $dh;
 
-    sub by_date { $b->{date} <=> $a->{date} };
-    my @sorted_files = sort by_date @files;
+    my $by_date = sub { $b->{date} <=> $a->{date} };
+    my @sorted_files = sort $by_date @files;
 
     my $pager = Data::Page->new();
     $pager->total_entries(scalar @files);