X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/88048e2c00e3e9a9c172e788722354017cd401ec..58725794d72361cc70cb082476a32d08e22d21d0:/writing.plp?ds=sidebyside diff --git a/writing.plp b/writing.plp index fc0a923..82049fe 100644 --- a/writing.plp +++ b/writing.plp @@ -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$_" }