From: Mischa POSLAWSKY Date: Fri, 7 Apr 2017 18:26:05 +0000 (+0200) Subject: charset: inline request build X-Git-Tag: v1.10~226 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/f5b22bf2d6aef261464440bd548285b52908be3d charset: inline request build --- diff --git a/charset.plp b/charset.plp index 7794284..8b42e62 100644 --- a/charset.plp +++ b/charset.plp @@ -24,6 +24,7 @@ my @tablist = split /[^\w-]+/, $Request || 'default'; use POSIX qw( ceil ); use Shiar_Sheet::FormatChar; my $glyphs = Shiar_Sheet::FormatChar->new; +my @request; sub tabinput { # generate character table(s) @@ -59,7 +60,8 @@ sub tabinput { 11 => 'thai', }; if (my $follow = $ALIAS->{$input}) { - return map { tabinput($_) } ref $follow ? @{$follow} : $follow; + tabinput($_) for ref $follow ? @{$follow} : $follow; + return; } my %row = (offset => 0, cols => 16); @@ -122,9 +124,9 @@ sub tabinput { Alert("Encoding $input unknown"); return; } - return \%row; + push @request, \%row; } -my @request = map { tabinput($_) } @tablist; +tabinput($_) for @tablist; my $NOCHAR = chr 0xFFFD;