… | |
… | |
96 | |
96 | |
97 | use strict; |
97 | use strict; |
98 | use warnings; |
98 | use warnings; |
99 | use utf8; |
99 | use utf8; |
100 | |
100 | |
101 | my $rcsid = '$Id: generate,v 1.5 2007/09/16 07:44:24 pippijn Exp $'; |
101 | my $rcsid = '$Id: generate,v 1.6 2007/09/16 07:55:13 pippijn Exp $'; |
102 | |
102 | |
103 | use base "Pod::POM::View"; |
103 | use base "Pod::POM::View"; |
104 | |
104 | |
105 | our $subdir; |
105 | our $subdir; |
106 | our $dir; |
106 | our $dir; |
… | |
… | |
110 | my ($self, $item) = @_; |
110 | my ($self, $item) = @_; |
111 | $item->content->present ($self) |
111 | $item->content->present ($self) |
112 | } |
112 | } |
113 | |
113 | |
114 | sub view_head1 { |
114 | sub view_head1 { |
|
|
115 | my ($self, $item) = @_; |
|
|
116 | $item->content->present ($self) |
|
|
117 | } |
|
|
118 | |
|
|
119 | sub view_head2 { |
115 | my ($self, $item) = @_; |
120 | my ($self, $item) = @_; |
116 | "<p><em>", $item->title, " ", $item->content, "</em></p>" |
121 | "<p><em>", $item->title, " ", $item->content, "</em></p>" |
117 | } |
122 | } |
118 | |
123 | |
119 | =head1 AUTHOR |
124 | =head1 AUTHOR |
… | |
… | |
125 | This library is free software, you can redistribute it and/or modify |
130 | This library is free software, you can redistribute it and/or modify |
126 | it under the terms of the GNU General Public License. |
131 | it under the terms of the GNU General Public License. |
127 | |
132 | |
128 | =cut |
133 | =cut |
129 | |
134 | |
130 | 1 |
135 | 1; |
|
|
136 | |
|
|
137 | |
|
|
138 | package PodRSS; |
|
|
139 | |
|
|
140 | use strict; |
|
|
141 | use warnings; |
|
|
142 | use utf8; |
|
|
143 | |
|
|
144 | use base "Pod::POM::View"; |
|
|
145 | |
|
|
146 | our %metadata; |
|
|
147 | |
|
|
148 | sub view_pod { |
|
|
149 | my ($self, $item) = @_; |
|
|
150 | "<?xml version='1.0' encoding='utf-8'?>\n", |
|
|
151 | "<rss version='2.0'>\n", |
|
|
152 | $item->content->present ($self), |
|
|
153 | "</rss>\n" |
|
|
154 | } |
|
|
155 | |
|
|
156 | sub view_head1 { |
|
|
157 | my ($self, $item) = @_; |
|
|
158 | my $title = $item->title->present ($self); |
|
|
159 | " <channel>\n", |
|
|
160 | " <link>$metadata{link}</link>\n", |
|
|
161 | " <language>$metadata{language}</language>\n", |
|
|
162 | " <title>$title</title>\n", |
|
|
163 | $item->content->present ($self), |
|
|
164 | " </channel>\n" |
|
|
165 | } |
|
|
166 | |
|
|
167 | sub view_head2 { |
|
|
168 | my ($self, $item) = @_; |
|
|
169 | my $title = $item->title->present ($self); |
|
|
170 | " <item>\n", |
|
|
171 | " <title>$title</title>\n", |
|
|
172 | $item->content->present ($self), |
|
|
173 | " </item>\n" |
|
|
174 | } |
|
|
175 | |
|
|
176 | sub view_textblock { |
|
|
177 | my ($self, $item) = @_; |
|
|
178 | " <description><![CDATA[$item]]></description>\n" |
|
|
179 | } |