From: Mischa POSLAWSKY Date: Sun, 22 Feb 2015 15:16:43 +0000 (+0100) Subject: digraphs: mkdigraphlist: avoid undefinedness warnings X-Git-Tag: v1.7~91 X-Git-Url: http://git.shiar.net/sheet.git/commitdiff_plain/493613a1a6f65eed64f84c4d1bdd2f539416d786 digraphs: mkdigraphlist: avoid undefinedness warnings --- diff --git a/digraphs.plp b/digraphs.plp index 18123a6..84ac971 100644 --- a/digraphs.plp +++ b/digraphs.plp @@ -23,7 +23,8 @@ Also see common digraphs.

are available as ex commands.

<: -my $di = do 'digraphs.inc.pl'; +my $di = do 'digraphs.inc.pl' + or die "Error loading digraphs data: ", $@ // $!; my @chars = ( [qw{! " % ' ( ) * + , - . /}], diff --git a/tools/mkdigraphlist b/tools/mkdigraphlist index ecd825f..500abbb 100755 --- a/tools/mkdigraphlist +++ b/tools/mkdigraphlist @@ -33,11 +33,11 @@ printf '(map {$_=>0} qw{%s}),'."\n", join(' ', printf "q{%s}=>[%s],\n", s/(?=[\\}])/\\/gr, join(',', ord $di->{$_}, # original code point map {"'$_'"} - $uninfo->{ $di->{$_} }->[1], # name + $uninfo->{ $di->{$_} }->[1] // '', # name $vim->{$_} ? $rfc->{$_} ? 'u-di' : 'u-prop' # vim+rfc or vim-only : 'u-prop ex', # neither - $uninfo->{ $di->{$_} }->[0] =~ s/ u-di| u-prop| ex//gr, # class + ($uninfo->{ $di->{$_} }->[0] // '') =~ s/ u-di| u-prop| ex//gr, # class $uninfo->{ $di->{$_} }->[4] // (), # string ) for sort keys %{$di}; print "}\n";