X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/7cb543cf854f39f74b99666475272ac29d788da2..2a99bcdadec88d7483903e2c8420ad3e78fcb805:/termcol.plp diff --git a/termcol.plp b/termcol.plp index f2dde7f..571b296 100644 --- a/termcol.plp +++ b/termcol.plp @@ -18,7 +18,7 @@ my @draw = map { [$_, s/\W+\z//] } grep { $_ } split m(/), $get{img} // exists $get{img} && 'indi.png'; my @termlist; -push @termlist, split /\W+/, $ENV{PATH_INFO} || 'default'; +push @termlist, split /\W+/, $Request || 'default'; :>

Terminal colours

@@ -105,7 +105,7 @@ sub coltable { coltable($_) for @{$info}; } - ref $info eq 'HASH' or next; + ref $info eq 'HASH' or return; my $caption = $info->{name} // $term; $caption = sprintf('<%s %s>%s', @@ -119,15 +119,15 @@ sub coltable { ) if $info->{href} or $info->{title}; if (my $mapinfo = $info->{rgbmap}) { - print ''."\n"; - printf "\n", $caption; + say '
%s
'; + say sprintf '', $caption; print coltable_hsv(@{$mapinfo}); - print "
%s
\n\n"; + say "\n"; } if (my $table = $info->{table}) { - print ''."\n"; - printf "\n", $caption; + say '
%s
'; + say sprintf '', $caption; for my $row (@$table) { print ''; print colcell(ref $_ ? @$_ : $_ ? reverse split /:/ : undef) for @$row; @@ -142,7 +142,7 @@ sub coltable { print "
%s
", img_egapal(\@imgpal, @{$_}); } } - print "
\n\n"; + say "\n"; } if (my $palette = $info->{list}) { @@ -154,8 +154,8 @@ sub coltable { my $rows = 8; my $columns = ceil(@{$palette} / $rows); - print '', "\n"; - printf "\n", $caption; + say '
%s
'; + say sprintf '', $caption; for my $row (0 .. $rows - 1) { print ''; for my $col (0 .. $columns - 1) { @@ -174,7 +174,7 @@ sub coltable { ); print "
%s
", img_egapal($imgpal, @{$_}); } - print "
\n\n"; + say "\n"; } }