X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/211543b923759291c93630472bae959c6e8fb652..cd1aa5e48c47c1830a8e205ee1d7366d7d08c59e:/charset.plp?ds=sidebyside diff --git a/charset.plp b/charset.plp index b0d3b83..3315669 100644 --- a/charset.plp +++ b/charset.plp @@ -1,4 +1,5 @@ <(common.inc.plp)><: +use 5.014; Html({ title => 'charset cheat sheet', @@ -89,9 +90,9 @@ my @request = map { } } else { - print "

Encoding $input unknown

\n"; + say "

Encoding $input unknown

"; } - \%row; + $row{set} ? \%row : (); } else { (); @@ -123,7 +124,7 @@ sub range_cell { $cols = $len if $len < $cols; #TODO: optimise if ($len -= $cols) { # continued on new row - $table->{$offset + $nibsize*$cols} = [$len*$nibsize, "$class joinu", $name, $title]; + $table->{$offset + $nibsize*$cols} //= [$len*$nibsize, "$class joinu", $name, $title]; $name = ''; $class .= ' joind'; } @@ -133,7 +134,7 @@ sub range_cell { # multiple full rows if ($len -= $rows << 4) { # partial row remains - $table->{$offset + $nibsize*$rows * 16} = [$len*$nibsize, "$class joinu", '', $title]; + $table->{$offset + $nibsize*$rows * 16} //= [$len*$nibsize, "$class joinu", '', $title]; $class .= ' joind'; } $attr .= sprintf ' rowspan=%d', $rows;