line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Orze::Sources::Pod; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1046
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use base "Orze::Sources"; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
71
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
2048
|
use Pod::Simple::XHTML; |
|
1
|
|
|
|
|
96988
|
|
|
1
|
|
|
|
|
192
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Orze::Sources::Pod - Load a Pod file and render it as a html fragment |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 DESCRIPTION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Take the file given in the C attribute, append C<.pod> suffix, |
17
|
|
|
|
|
|
|
load it and render it as a html fragment usable in your template. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
You can use LZ<><> to refer to other pages of your website. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 METHOD |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head2 evaluate |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub evaluate { |
28
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
my $page = $self->{page}; |
31
|
0
|
|
|
|
|
|
my $var = $self->{var}; |
32
|
0
|
|
|
|
|
|
my $file = $self->file("pod"); |
33
|
|
|
|
|
|
|
|
34
|
0
|
0
|
|
|
|
|
if (-r $file) { |
35
|
0
|
|
|
|
|
|
my $output; |
36
|
0
|
|
|
|
|
|
my $parser = Pod::Simple::XHTML->new(); |
37
|
0
|
|
|
|
|
|
$parser->output_string(\$output); |
38
|
0
|
|
|
|
|
|
$parser->html_header(""); |
39
|
0
|
|
|
|
|
|
$parser->html_footer(""); |
40
|
0
|
|
|
|
|
|
$parser->perldoc_url_prefix(""); |
41
|
0
|
|
|
|
|
|
$parser->parse_file($file); |
42
|
0
|
|
|
|
|
|
return $output; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
else { |
45
|
0
|
|
|
|
|
|
$self->warning("unable to read file " . $file); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |