Source of writing.plp

<(common.inc.plp)><:

my $source = lc $Request || 'phnx';
$source =~ s/^brah\Kmi$//;
my $include = "writing-$source";

my $info = eval { Data($include) } || {};

Html({
	title => $info->{pagetitle} || "$info->{title} scripts comparison sheet",
	version => $info->{version} || '0.1',
	description => $info->{description},
	keywords => [@{ $info->{keywords} // []}, qw(
		writing script glyph unicode character letter comparison history
		alphabet sample test language multilingual
	)],
	stylesheet => [qw'light circus dark red mono'],
	data => ["$include.inc.pl"],
});

my $rows = $info->{list} or Abort(
	"Requested script parent <q>$source</q> not available",
	'404 request not found',
);

say "<h1>\u$info->{title} scripts</h1>";
say "<p>$_</p>" for $info->{intro} || ();
say '<div class="section">';

use Shiar_Sheet::FormatChar;
my $glyphs = Shiar_Sheet::FormatChar->new;
unless (exists $get{v}) {
	$glyphs->{unicode}--;
	$glyphs->{anno}  = [];
	$glyphs->{style} = 'univer';
}

my $scriptname = eval { Data('writing-script') }; # optional translations
$_ = showlink($_, "/latin") for $scriptname->{latn} || ();
$_ = showlink($_, "/writing/brahmi") for $scriptname->{brah} || ();

say $glyphs->table([map {
	my $lead = s/^(-)// && $1;
	(map { ".>$lead$_" }
		$scriptname->{$source.'_'.$_} || $scriptname->{$_} || $_
	),
	@{ $info->{table}->{$_} || [] }
} @{$rows}]);

say "</div>\n";

say for '<hr/>', $glyphs->legend;