From 5d3197190906890636c61069885f9240d2816f32 Mon Sep 17 00:00:00 2001 From: Nigel McNie Date: Thu, 12 Jun 2008 12:03:03 +1200 Subject: [PATCH] Some refactoring I missed, as pointed out by Martyn. --- tks.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tks.pl b/tks.pl index 6ed5c57..c1a7eb3 100755 --- a/tks.pl +++ b/tks.pl @@ -165,14 +165,12 @@ sub load_timesheet_file { } foreach my $date ( keys %{$result} ) { - my $found_error = 0; if ( my @errors = grep { $_->{needs_closing_time} } @{$result->{$date}} ) { - $found_error = 1; foreach my $error ( @errors ) { print "Error on line ", $error->{linenumber}, ": no closing time found\n"; } + exit 1; } - exit 1 if $found_error; } return $result; -- 2.39.5