… | |
… | |
8 | my $parser = new Pod::POM meta => 1; |
8 | my $parser = new Pod::POM meta => 1; |
9 | |
9 | |
10 | my ($pom, $html); |
10 | my ($pom, $html); |
11 | |
11 | |
12 | our $top_news; |
12 | our $top_news; |
|
|
13 | our $top_news_cnt = 2; |
13 | |
14 | |
14 | $pom = $parser->parse ("src/news.pod") |
15 | $pom = $parser->parse ("src/news.pod") |
15 | or die $parser->error; |
16 | or die $parser->error; |
16 | $html = join '', $pom->present ("PodHTML"); |
17 | $html = join '', $pom->present ("PodHTML"); |
17 | $html =~ s/\[/</g; |
18 | $html =~ s/\[/</g; |
… | |
… | |
53 | use warnings; |
54 | use warnings; |
54 | use utf8; |
55 | use utf8; |
55 | |
56 | |
56 | use CGI qw/escapeHTML/; |
57 | use CGI qw/escapeHTML/; |
57 | |
58 | |
58 | my $rcsid = '$Id: generate,v 1.33 2010/04/28 08:19:55 elmex Exp $'; |
59 | my $rcsid = '$Id: generate,v 1.34 2010/05/05 06:46:33 elmex Exp $'; |
59 | |
60 | |
60 | use base "Pod::POM::View"; |
61 | use base "Pod::POM::View"; |
61 | |
62 | |
62 | our $subdir; |
63 | our $subdir; |
63 | our $dir; |
64 | our $dir; |
… | |
… | |
80 | . $item->title |
81 | . $item->title |
81 | . "</span>\n" |
82 | . "</span>\n" |
82 | . $item->content->present ($self) |
83 | . $item->content->present ($self) |
83 | . "\n\n"; |
84 | . "\n\n"; |
84 | |
85 | |
85 | unless (defined $top_news) { |
86 | if ($top_news_cnt-- > 0) { |
86 | $top_news = $str |
87 | $top_news .= $str |
87 | } |
88 | } |
88 | |
89 | |
89 | $str |
90 | $str |
90 | } |
91 | } |
91 | |
92 | |