From: Mischa POSLAWSKY Date: Sat, 22 Apr 2017 09:53:14 +0000 (+0200) Subject: charset: common check of compare option X-Git-Tag: v1.10~98 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/0e07efe0549f928d061f52c16ed9a4ee8260b49a charset: common check of compare option --- diff --git a/charset.plp b/charset.plp index 1b672e9..d2c92c5 100644 --- a/charset.plp +++ b/charset.plp @@ -1,5 +1,8 @@ <(common.inc.plp)><: +my $mode = exists $get{compare}; +my @tablist = split m{/+}, $Request || 'default'; + Html({ title => 'charset cheat sheet', version => '1.0', @@ -18,8 +21,6 @@ Html({ )], }); -my @tablist = split m{/+}, $Request || 'default'; - use List::Util qw( first pairmap pairfirst pairs ); :> @@ -404,7 +405,7 @@ for my $row (@request) { my ($cell, $name, $class) = $glyph eq $NOCHAR ? () : $glyphs->glyph_html($glyph); - if (exists $get{compare}) { + if ($mode) { state $visible = {}; $class = ( $cp == ord $glyph ? 'l4' : @@ -431,7 +432,7 @@ for my $row (@request) {
- <: if (exists $get{compare}) { :> +
<: if ($mode) { :>
unicode inherited existing