line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package ExtUtils::XSBuilder::PODTemplate; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# -------------------------------------------------------------------------- |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
{ |
10
|
0
|
|
|
0
|
0
|
|
my $class = shift ; |
11
|
0
|
|
|
|
|
|
my $self = {} ; |
12
|
0
|
|
|
|
|
|
bless $self, $class ; |
13
|
0
|
|
|
|
|
|
return $self ; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# -------------------------------------------------------------------------- |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
0
|
0
|
|
sub since_default { undef } ; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# -------------------------------------------------------------------------- |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub gen_pod_head |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
{ |
26
|
0
|
|
|
0
|
0
|
|
my ($self, $module) = @_ ; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
qq{ |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 NAME |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
$module |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 FUNCTIONS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
} ; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# -------------------------------------------------------------------------- |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub gen_pod_func |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
{ |
45
|
0
|
|
|
0
|
0
|
|
my ($self, $objclass, $obj, $method, $args, $retclass, $ret, $comment, $since) = @_ ; |
46
|
|
|
|
|
|
|
|
47
|
0
|
0
|
|
|
|
|
my $argnames = join (',', map { $_ -> {name} } @{$args}[($objclass?1:0)..$#$args]) ; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
48
|
0
|
0
|
|
|
|
|
my $rettext = $retclass?'$ret = ':'' ; |
49
|
0
|
0
|
|
|
|
|
my $objtext = $objclass?"$obj -> ":'' ; |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
my $data = qq{ |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 \@func: $method() |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
$rettext$objtext $method($argnames) |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=over 4 |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
} ; |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
foreach $arg (@$args) |
62
|
|
|
|
|
|
|
{ |
63
|
0
|
|
|
|
|
|
$data .= qq{ |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item \@param: $arg->{class} $arg->{name} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
$arg->{comment} |
68
|
|
|
|
|
|
|
} ; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
0
|
0
|
|
|
|
|
if ($retclass) |
72
|
|
|
|
|
|
|
{ |
73
|
0
|
|
|
|
|
|
$data .= qq{ |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=item \@ret: $retclass |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
$retcomment |
78
|
|
|
|
|
|
|
} ; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
|
$data .= qq{ |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=item \@since: $since |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=back |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
$comment |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
} ; |
90
|
|
|
|
|
|
|
|
91
|
0
|
|
|
|
|
|
return $data ; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
# -------------------------------------------------------------------------- |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub gen_pod_struct_member |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
{ |
102
|
0
|
|
|
0
|
0
|
|
my ($self, $objclass, $obj, $memberclass, $member, $comment, $since) = @_ ; |
103
|
|
|
|
|
|
|
|
104
|
0
|
0
|
|
|
|
|
qq{ |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 \@func: $member() |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
\$val = $obj -> $member(\$newval) |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=over 4 |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item \@param: $objclass $obj |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item \@param: $memberclass \$newval |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
} . |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
($since?"=item \@since: $since\n\n":'') . |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
qq{ |
121
|
|
|
|
|
|
|
=back |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
$comment |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
} ; |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
1; |