aboutsummaryrefslogtreecommitdiff
path: root/ListParser.pm
diff options
context:
space:
mode:
Diffstat (limited to 'ListParser.pm')
-rw-r--r--ListParser.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/ListParser.pm b/ListParser.pm
index 9e3e511..b7c3f26 100644
--- a/ListParser.pm
+++ b/ListParser.pm
@@ -83,9 +83,9 @@ sub parse_list {
my $item = substr($input, $item_i, $i - $item_i);
$item =~ s/^\s+|\s+$//g;
if ($is_hash) {
- # FIXME should we die on duplicate keys or no?
my ($error, $key, $value) = parse_mapping($item);
die $error if $error;
+ die "Error: duplicate key \"$key\"" if grep {$_ eq $key} (keys %h_res);
$h_res{$key} = $value;
} else {
push @a_res, $item;