# HG changeset patch # User Vincent Tondellier # Date 1336043825 -7200 # Node ID 8dfc7e5dbdc7f3799a08a6d5e1a248d5eb1aae2e # Parent 7ffe7b48b8deaf0a2974dbd1c6ecd62c67b8a8d3 Fix compatibility with perl < 5.11 diff -r 7ffe7b48b8de -r 8dfc7e5dbdc7 CrashTest.pl --- a/CrashTest.pl Wed May 02 21:46:54 2012 +0200 +++ b/CrashTest.pl Thu May 03 13:17:05 2012 +0200 @@ -55,9 +55,12 @@ my $self = shift; my @files; - opendir my ($dh), $data_path; - while(readdir $dh) { - if($_ =~ /(.*)\.json$/) { + opendir my ($dh), $data_path or die $!; + my @allfiles = readdir $dh; + foreach(@allfiles) + { + if($_ =~ /(.*)\.json$/) + { my $filename = File::Spec->catfile($data_path, $_); push @files, { file => $filename,