{ head("Lintian Tags") }
  <h1>Tags</h1>

  <p>
    This is a list of all tags that occur at least once in the archive
    with their frequency counts.  This includes all tags, even
    experimental and info tags.
  </p>

  <ul>
{
    for my $tag (sort keys %stats) {
        my $q_tag = html_quote($tag);
        my $packages = $stats{$tag}{'packages'};
        my $count = $stats{$tag}{'count'};
        my $packages_str = $packages != 1 ?
               "$packages packages" :
               "$packages package";
        my $count_str = $count != 1 ? "$count tags" : "$count tag";
        my $overrides = $stats{$tag}{'overrides'};
        my $overrides_str = '';
        if ($overrides) {
            if ($overrides == 1) {
                $overrides_str = ", plus $overrides override";
            } else {
                $overrides_str = ", plus $overrides overrides";
            }
        }
        $OUT .= qq(    <li><a href="${path_prefix}tags/${q_tag}.html">${q_tag}</a>)
            . " ($packages_str, ${count_str}${overrides_str}"
            . ")</li>\n";
    }
}  </ul>
{ foot() }
