charset: ignore unknown input, highlight warning
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 27 Mar 2017 22:18:20 +0000 (00:18 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 29 Mar 2017 11:51:18 +0000 (13:51 +0200)
charset.plp

index b0d3b834b477f366d3cc534120fc59927bb123f3..bd20ca9ef47a1234742236ef0592d33d735aa5a1 100644 (file)
@@ -1,4 +1,5 @@
 <(common.inc.plp)><:
+use 5.014;
 
 Html({
        title => 'charset cheat sheet',
@@ -89,9 +90,9 @@ my @request = map {
                        }
                }
                else {
-                       print "<p>Encoding $input unknown</p>\n";
+                       say "<p class=error>Encoding <q>$input</q> unknown</p>";
                }
-               \%row;
+               $row{set} ? \%row : ();
        }
        else {
                ();