From 0e07efe0549f928d061f52c16ed9a4ee8260b49a Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 22 Apr 2017 11:53:14 +0200 Subject: [PATCH] charset: common check of compare option --- charset.plp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 -- 2.30.0