From: Mischa POSLAWSKY Date: Sun, 23 Oct 2016 04:02:19 +0000 (+0200) Subject: termcol: named function to parse table data X-Git-Tag: v1.9~32 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/bcdcb872044a3146c38f3c17bb601130f170aff4 termcol: named function to parse table data Prepare for recursive includes. --- diff --git a/termcol.plp b/termcol.plp index 7e408e6..0000143 100644 --- a/termcol.plp +++ b/termcol.plp @@ -106,9 +106,11 @@ sub img_egapal { } || $@; } -for my $term (@termlist) { +sub coltable { + my ($term) = @_; my $info = $palettes->{$term}; ref $info eq 'HASH' or next; + my $caption = $info->{name} // $term; $caption = sprintf('<%s %s>%s', $info->{href} ? 'a' : 'span', @@ -250,6 +252,7 @@ sub coltable_hsv { return $out; } +coltable($_) for @termlist; :>