line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
19
|
|
|
19
|
|
195
|
use 5.10.1; |
|
19
|
|
|
|
|
75
|
|
2
|
19
|
|
|
19
|
|
84
|
use strict; |
|
19
|
|
|
|
|
28
|
|
|
19
|
|
|
|
|
302
|
|
3
|
19
|
|
|
19
|
|
73
|
use warnings; |
|
19
|
|
|
|
|
26
|
|
|
19
|
|
|
|
|
3817
|
|
4
|
|
|
|
|
|
|
package Data::Processor::PodWriter; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# writes pod for a schema given. |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub pod_write{ |
9
|
3
|
|
|
3
|
0
|
12
|
my $schema = shift; |
10
|
3
|
|
|
|
|
5
|
my $pod_string = shift; |
11
|
3
|
|
|
|
|
2
|
for my $key (sort keys %{$schema}){ |
|
3
|
|
|
|
|
9
|
|
12
|
4
|
|
|
|
|
6
|
$pod_string .= $key; |
13
|
|
|
|
|
|
|
$pod_string .= " (optional)" |
14
|
4
|
100
|
|
|
|
8
|
if $schema->{$key}->{optional}; |
15
|
|
|
|
|
|
|
$pod_string .= ": $schema->{$key}->{description}" |
16
|
4
|
50
|
|
|
|
9
|
if $schema->{$key}->{description}; |
17
|
|
|
|
|
|
|
$pod_string .= "\n\nDefault value: $schema->{$key}->{default}" |
18
|
4
|
100
|
|
|
|
8
|
if defined $schema->{$key}->{default}; |
19
|
4
|
|
|
|
|
4
|
$pod_string .= "\n\n"; |
20
|
4
|
100
|
|
|
|
8
|
if ($schema->{$key}->{members}){ |
21
|
2
|
|
|
|
|
4
|
$pod_string .= "$key has the following members:\n\n"; |
22
|
2
|
|
|
|
|
3
|
$pod_string .= "=over\n\n"; |
23
|
2
|
|
|
|
|
5
|
$pod_string .= pod_write($schema->{$key}->{members}, ''); |
24
|
2
|
|
|
|
|
5
|
$pod_string .= "=back\n\n"; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
3
|
|
|
|
|
6
|
return $pod_string; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1 |