charset: extend inheritance to generic metadata hashes
[sheet.git] / charset.plp
index 7ff3f420a2dd25d4dc652ad67231193da1313a2b..1b672e93ebfc091575b912728d32d7660d5fe1ca 100644 (file)
@@ -76,7 +76,7 @@ use Shiar_Sheet::FormatChar;
 my $glyphs = Shiar_Sheet::FormatChar->new;
 my @request;
 
-my $INHERIT = do 'charset-encoding.inc.pl'
+my $charsets = do 'charset-encoding.inc.pl'
        or Alert('Encoding metadata could not be read', $@ || $!);
 
 sub tabinput {
@@ -136,7 +136,8 @@ sub tabinput {
        my $params = $input =~ s/[+](.*)\z// ? $1 : undef;
 
        if (not defined $params) {
-               my @parents = @{ $INHERIT->{$input} || [] };
+               my $charset = $charsets->{$input} || {};
+               my @parents = @{ $charset->{inherit} || [] };
 
                if (my ($parent, $part) = pairfirst { defined $visible->{$a} } @parents) {
                        $row{parent} = $parent;