From b7a0f88d61e7e403fc0031a89a3526a51becd7a2 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Tue, 16 Apr 2024 22:22:33 +0200 Subject: [PATCH] Avoid undef warnings in perform html. --- perform-html.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perform-html.pl b/perform-html.pl index 6f0f9fa..b4f2261 100755 --- a/perform-html.pl +++ b/perform-html.pl @@ -1228,8 +1228,8 @@ sub html_cvsdate_test_row { my $rp0 = $dv->{$cvsdates[0]}{repeats}; my $value0 = $rp0 ? first { $_ } map { $vt->{$cvsdates[0]}{$_}[$i] } @$rp0 : - first { $_ } map { $vt->{$_}[$i] } @cvsdates; - my ($name0, $unit0) = ($value0->{name}, $value0->{unit}); + first { $_ } map { ($vt->{$_} || [])->[$i] } @cvsdates; + my ($name0, $unit0) = ($value0->{name} // "", $value0->{unit} // ""); print $html " \n \n"; print $html " $name0\n"; my @numbers = map { ref($vt->{$_}) eq 'HASH' ?