<(common.inc.plp)><:
+my $mode = exists $get{compare};
+my @tablist = split m{/+}, $Request || 'default';
+
Html({
title => 'charset cheat sheet',
version => '1.0',
)],
});
-my @tablist = split m{/+}, $Request || 'default';
-
use List::Util qw( first pairmap pairfirst pairs );
:>
my $glyphs = Shiar_Sheet::FormatChar->new;
my @request;
-my $INHERIT = do 'charset-encoding.inc.pl'
+my $charsets = do 'charset-encoding.inc.pl'
or Alert('Encoding metadata could not be read', $@ || $!);
sub tabinput {
my $params = $input =~ s/[+](.*)\z// ? $1 : undef;
if (not defined $params) {
- my @parents = @{ $INHERIT->{$input} || [] };
+ my $charset = $charsets->{$input} || {};
+ my @parents = @{ $charset->{inherit} || [] };
if (my ($parent, $part) = pairfirst { defined $visible->{$a} } @parents) {
$row{parent} = $parent;
my ($cell, $name, $class) = $glyph eq $NOCHAR ? () :
$glyphs->glyph_html($glyph);
- if (exists $get{compare}) {
+ if ($mode) {
state $visible = {};
$class = (
$cp == ord $glyph ? 'l4' :
<hr>
<div class="legend">
- <table class="glyphs"><tr><: if (exists $get{compare}) { :>
+ <table class="glyphs"><tr><: if ($mode) { :>
<td class="X l4">unicode
<td class="X l3">inherited
<td class="X l2">existing