charset: persistent data of unicode cell include
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 22 Apr 2017 13:27:54 +0000 (15:27 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 25 May 2017 20:13:05 +0000 (22:13 +0200)
Avoid multiple loads of same data in unicode preset.

charset-encoding.inc.pl

index ec53ef5..6e46477 100644 (file)
@@ -188,8 +188,9 @@ use utf8;
        }},
        u              => {setup => sub {
                my $row = shift;
-               $row->{cell} = do 'charset-unicode.inc.pl'
+               state $celldata = do 'charset-unicode.inc.pl'
                        or Alert('Table data could not be read', $@ || $!);
+               $row->{cell} = $celldata;
 
                $row->{endpoint} ||= 0x1FFF;
                $row->{set} = 'Unicode ' . (