From: Andrew Chilton Date: Thu, 3 Jul 2008 12:15:12 +0000 (+1200) Subject: Just return an empty hash if reading an empty file. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4b977eec7366c57ced2876b99e143b9c73d53a3d;p=cil.git Just return an empty hash if reading an empty file. --- diff --git a/lib/CIL/Utils.pm b/lib/CIL/Utils.pm index e9611cf..47f7ada 100644 --- a/lib/CIL/Utils.pm +++ b/lib/CIL/Utils.pm @@ -41,7 +41,7 @@ sub parse_cil_file { my ($class, $filename, $last_field) = @_; my @lines = read_file($filename); - return unless @lines; + return {} unless @lines; return $class->parse_from_lines( $last_field, @lines ); }