#use wml::std::tags sub read_news { my $max = $_[0]; my $key, $date; require 'scripts/lib-news.pl'; my %title_hash = (); my %summary_hash = (); parse_news(\%title_hash, \%summary_hash); foreach $key (sort {$b cmp $a} keys %summary_hash) { print "\n
$key
\n$summary_hash{$key}\n\n"; $max--; last if ($max <= 0); } return; } sub print_table_header { my $type = $_[0]; if ($type eq 'news') { print "\n"; print "\n"; } else { print "News flashes  \n"; print 'Follow @GnuTLS'; print "\n
DateComment
\n"; } return; }
<:= &print_table_header("$(TABLE_CLASS)") :> <:= &read_news($(MAX_NEWS)) :>