X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/16499a59e8c124cedc7cc499a3ebfaeb714e1f44..20ca68ae05fb47fc98efa06bb675df13d4c94de5:/writing.plp diff --git a/writing.plp b/writing.plp index 2f08da6..82049fe 100644 --- a/writing.plp +++ b/writing.plp @@ -2,7 +2,7 @@ Html({ title => 'writing system inheritance sheet', - version => '1.2', + version => '1.3', description => [ "Character comparison,", "tracking letters as they evolve from Phoenician to modern scripts.", @@ -35,7 +35,7 @@ unless (exists $get{v}) { $glyphs->{style} = 'univer'; } -my $scriptname = do 'writing-script.inc.pl'; +my $scriptname = eval { Data('writing-script') }; # optional translations $_ = showlink($_, "/latin") for $scriptname->{latn} || (); for ( @@ -43,12 +43,11 @@ for ( [brah => 'Brahmi'], ) { my ($source, $title) = @$_; - my @table = do "writing-$source.inc.pl"; - if ($! or $@) { + my @table = eval { Data("writing-$source") } or do { say "

$title

"; - printf "

Table data not found: %s.

\n", $@ || $!; + printf "

%s: %s.

\n", @{$@}; next; - } + }; $glyphs->print($title => [map { my $lead = s/^(-)// && $1; ref $_ eq 'ARRAY' ? @$_ : map { ".>$lead$_" }