1 | package cf::pod; |
1 | package cf::pod; |
|
|
2 | |
|
|
3 | use Pod::POM; |
2 | |
4 | |
3 | our $indent; |
5 | our $indent; |
4 | our $level; |
6 | our $level; |
5 | our @result; |
7 | our @result; |
6 | |
8 | |
… | |
… | |
146 | |
148 | |
147 | ############################################################################# |
149 | ############################################################################# |
148 | |
150 | |
149 | package cf::pod; |
151 | package cf::pod; |
150 | |
152 | |
151 | sub as_paragraphs($) { |
153 | sub pom_as_paragraphs($) { |
152 | my ($pom) = @_; |
154 | my ($pom) = @_; |
153 | |
155 | |
154 | # we suckers use global variables, unfortunately. |
156 | # we suckers use global variables, unfortunately. |
155 | my $guard = cf::lock_acquire "cf::pod::as_paragraphs"; |
157 | my $guard = cf::lock_acquire "cf::pod::as_paragraphs"; |
156 | |
158 | |
… | |
… | |
161 | $pom->present ("cf::pod::AsParagraphs"); |
163 | $pom->present ("cf::pod::AsParagraphs"); |
162 | |
164 | |
163 | [grep $_->{index} || exists $_->{markup}, @result] |
165 | [grep $_->{index} || exists $_->{markup}, @result] |
164 | } |
166 | } |
165 | |
167 | |
|
|
168 | sub load_pod($) { |
|
|
169 | my ($path) = @_; |
|
|
170 | |
|
|
171 | cf::cache "cf::pod::as_paragraphs/$path" => $path, |
|
|
172 | 1 => sub { |
|
|
173 | }; |
|
|
174 | } |
|
|
175 | |
|
|
176 | |
166 | 1; |
177 | 1; |
167 | |
178 | |