\ <%perl> my @line = Deal::line; my ($row, $col, $box) = (0, 0, 0); for (my $i = 0; $i < @line; $i++) { if ($col) { $m->out(" "); } else { if (!$box) { my $class = $row == 0 ? "first" : $i + $nrow*$nbox >= @line ? "last" : "mid"; $m->out("\n"); } my $class = ($box + $row)%2 ? "odd " : "even"; $m->out("\n
"); } $m->out($line[$i]); $col++; if ($col >= $nbox) { $col = 0; $box++; } if ($box >= $nrow) { $box = 0; $row++; } } $m->out("\n");
%# <%flags> inherit => "%html" %# <%args> $nbox => 4 $nrow => 4 %# <%method title>Single hand %# <%once> use Deal; %# <%init> unless ($m->dhandler_arg eq "") { $m->clear_buffer; $m->comp("%not-found", what => $m->dhandler_arg); }