| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
3
|
|
|
3
|
|
2399168
|
use 5.14.0; |
|
|
3
|
|
|
|
|
13
|
|
|
2
|
3
|
|
|
3
|
|
15
|
use strict; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
76
|
|
|
3
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
185
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Pod::Elemental::Transformer::Splint; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.1003'; # VERSION |
|
8
|
|
|
|
|
|
|
# ABSTRACT: Documentation from class metadata |
|
9
|
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
872
|
use Moose; |
|
|
2
|
|
|
1
|
|
477108
|
|
|
|
2
|
|
|
|
|
14
|
|
|
|
1
|
|
|
|
|
7629
|
|
|
|
1
|
|
|
|
|
10517
|
|
|
|
1
|
|
|
|
|
66
|
|
|
11
|
2
|
|
|
2
|
|
16257
|
use Path::Tiny; |
|
|
2
|
|
|
1
|
|
20275
|
|
|
|
2
|
|
|
|
|
171
|
|
|
|
1
|
|
|
|
|
674
|
|
|
|
1
|
|
|
|
|
389
|
|
|
|
1
|
|
|
|
|
131
|
|
|
12
|
2
|
|
|
2
|
|
1454
|
use Safe::Isa; |
|
|
2
|
|
|
1
|
|
910
|
|
|
|
2
|
|
|
|
|
268
|
|
|
|
1
|
|
|
|
|
7
|
|
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
55
|
|
|
13
|
2
|
|
|
2
|
|
13
|
use Try::Tiny; |
|
|
2
|
|
|
1
|
|
5
|
|
|
|
2
|
|
|
|
|
111
|
|
|
|
1
|
|
|
|
|
677
|
|
|
|
1
|
|
|
|
|
1692
|
|
|
|
1
|
|
|
|
|
66
|
|
|
14
|
2
|
|
|
2
|
|
1509
|
use List::UtilsBy 'extract_by'; |
|
|
2
|
|
|
1
|
|
3310
|
|
|
|
2
|
|
|
|
|
139
|
|
|
|
1
|
|
|
|
|
5
|
|
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
10
|
|
|
15
|
2
|
|
|
2
|
|
810
|
use lib 'lib'; |
|
|
2
|
|
|
1
|
|
650
|
|
|
|
2
|
|
|
|
|
18
|
|
|
|
1
|
|
|
|
|
539
|
|
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
22
|
|
|
16
|
|
|
|
|
|
|
with qw/Pod::Elemental::Transformer Pod::Elemental::Transformer::Splint::Util/; |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has command_name => ( |
|
19
|
|
|
|
|
|
|
is => 'rw', |
|
20
|
|
|
|
|
|
|
isa => 'Str', |
|
21
|
|
|
|
|
|
|
default => ':splint', |
|
22
|
|
|
|
|
|
|
); |
|
23
|
|
|
|
|
|
|
has default_type_library => ( |
|
24
|
|
|
|
|
|
|
is => 'rw', |
|
25
|
|
|
|
|
|
|
isa => 'Str', |
|
26
|
|
|
|
|
|
|
default => 'Types::Standard', |
|
27
|
|
|
|
|
|
|
predicate => 'has_default_type_library', |
|
28
|
|
|
|
|
|
|
); |
|
29
|
|
|
|
|
|
|
has type_libraries => ( |
|
30
|
|
|
|
|
|
|
is => 'rw', |
|
31
|
|
|
|
|
|
|
isa => 'HashRef', |
|
32
|
|
|
|
|
|
|
traits => ['Hash'], |
|
33
|
|
|
|
|
|
|
handles => { |
|
34
|
|
|
|
|
|
|
get_library_for_type => 'get', |
|
35
|
|
|
|
|
|
|
}, |
|
36
|
|
|
|
|
|
|
); |
|
37
|
|
|
|
|
|
|
has classmeta => ( |
|
38
|
|
|
|
|
|
|
is => 'rw', |
|
39
|
|
|
|
|
|
|
predicate => 'has_classmeta', |
|
40
|
|
|
|
|
|
|
); |
|
41
|
|
|
|
|
|
|
has html_attribute_renderer => ( |
|
42
|
|
|
|
|
|
|
is => 'rw', |
|
43
|
|
|
|
|
|
|
isa => 'Str', |
|
44
|
|
|
|
|
|
|
default => 'HtmlDefault', |
|
45
|
|
|
|
|
|
|
); |
|
46
|
|
|
|
|
|
|
#has text_attribute_renderer => ( |
|
47
|
|
|
|
|
|
|
# is => 'rw', |
|
48
|
|
|
|
|
|
|
# isa => 'Str', |
|
49
|
|
|
|
|
|
|
# default => '0', |
|
50
|
|
|
|
|
|
|
#); |
|
51
|
|
|
|
|
|
|
has html_method_renderer => ( |
|
52
|
|
|
|
|
|
|
is => 'rw', |
|
53
|
|
|
|
|
|
|
isa => 'Str', |
|
54
|
|
|
|
|
|
|
default => 'HtmlDefault', |
|
55
|
|
|
|
|
|
|
); |
|
56
|
|
|
|
|
|
|
#has text_method_renderer => ( |
|
57
|
|
|
|
|
|
|
# is => 'rw', |
|
58
|
|
|
|
|
|
|
# isa => 'Str', |
|
59
|
|
|
|
|
|
|
# default => '0', |
|
60
|
|
|
|
|
|
|
#); |
|
61
|
|
|
|
|
|
|
has attribute_renderers => ( |
|
62
|
|
|
|
|
|
|
is => 'rw', |
|
63
|
|
|
|
|
|
|
isa => 'ArrayRef', |
|
64
|
|
|
|
|
|
|
traits => ['Array'], |
|
65
|
|
|
|
|
|
|
handles => { |
|
66
|
|
|
|
|
|
|
add_attribute_renderer => 'push', |
|
67
|
|
|
|
|
|
|
all_attribute_renderers => 'elements', |
|
68
|
|
|
|
|
|
|
} |
|
69
|
|
|
|
|
|
|
); |
|
70
|
|
|
|
|
|
|
has method_renderers => ( |
|
71
|
|
|
|
|
|
|
is => 'rw', |
|
72
|
|
|
|
|
|
|
isa => 'ArrayRef', |
|
73
|
|
|
|
|
|
|
traits => ['Array'], |
|
74
|
|
|
|
|
|
|
handles => { |
|
75
|
|
|
|
|
|
|
add_method_renderer => 'push', |
|
76
|
|
|
|
|
|
|
all_method_renderers => 'elements', |
|
77
|
|
|
|
|
|
|
} |
|
78
|
|
|
|
|
|
|
); |
|
79
|
|
|
|
|
|
|
around BUILDARGS => sub { |
|
80
|
|
|
|
|
|
|
my $orig = shift; |
|
81
|
|
|
|
|
|
|
my $class = shift; |
|
82
|
|
|
|
|
|
|
my $args = shift; |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
my $type_libraries = {}; |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
if(exists $args->{'type_libraries'}) { |
|
87
|
|
|
|
|
|
|
my $lib = $args->{'type_libraries'}; |
|
88
|
|
|
|
|
|
|
$lib =~ s{([^\h]+=)}{---$1}g; |
|
89
|
|
|
|
|
|
|
$lib =~ s{^---}{}; |
|
90
|
|
|
|
|
|
|
$lib =~ s{\h}{}g; |
|
91
|
|
|
|
|
|
|
my @libraries = split /---/ => $lib; |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
foreach my $librarydata (@libraries) { |
|
94
|
|
|
|
|
|
|
my($library, $typesdata) = split /=/ => $librarydata; |
|
95
|
|
|
|
|
|
|
my @types = split /,/ => $typesdata; |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
foreach my $type (@types) { |
|
98
|
|
|
|
|
|
|
$type_libraries->{ $type } = $library; |
|
99
|
|
|
|
|
|
|
} |
|
100
|
|
|
|
|
|
|
} |
|
101
|
|
|
|
|
|
|
} |
|
102
|
|
|
|
|
|
|
$args->{'type_libraries'} = $type_libraries; |
|
103
|
|
|
|
|
|
|
$class->$orig($args); |
|
104
|
|
|
|
|
|
|
}; |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub BUILD { |
|
107
|
3
|
|
|
3
|
0
|
9948
|
my $self = shift; |
|
108
|
|
|
|
|
|
|
|
|
109
|
3
|
|
|
|
|
9
|
my $base = 'Pod::Elemental::Transformer::Splint'; |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
TYPE: |
|
112
|
3
|
|
|
|
|
9
|
foreach my $type (qw/attribute method/) { |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
RENDERER: |
|
115
|
6
|
|
|
|
|
14
|
foreach my $output (qw/html/) { |
|
116
|
6
|
|
|
|
|
33
|
my $accessor = sprintf '%s_%s_renderer', $output, $type; |
|
117
|
6
|
|
|
|
|
317
|
my $class = sprintf '%s::%sRenderer::%s', $base, ucfirst $type, $self->$accessor; |
|
118
|
|
|
|
|
|
|
|
|
119
|
6
|
50
|
|
|
|
280
|
next RENDERER if $self->$accessor eq '0'; |
|
120
|
2
|
|
|
2
|
|
1269
|
eval "use $class"; |
|
|
2
|
|
|
2
|
|
7
|
|
|
|
2
|
|
|
1
|
|
44
|
|
|
|
2
|
|
|
1
|
|
1225
|
|
|
|
2
|
|
|
|
|
7
|
|
|
|
2
|
|
|
|
|
48
|
|
|
|
6
|
|
|
|
|
553
|
|
|
|
1
|
|
|
|
|
594
|
|
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
20
|
|
|
|
1
|
|
|
|
|
397
|
|
|
|
1
|
|
|
|
|
593518
|
|
|
|
1
|
|
|
|
|
24
|
|
|
121
|
6
|
50
|
|
|
|
34
|
die "Can't use $class as renderer: $@" if $@; |
|
122
|
|
|
|
|
|
|
|
|
123
|
6
|
|
|
|
|
49
|
my $wanted_role = sprintf '%s::%sRenderer', $base, ucfirst $type; |
|
124
|
6
|
50
|
|
|
|
63
|
if(!$class->does($wanted_role)) { |
|
125
|
0
|
|
|
|
|
0
|
die "$class doesn't do the $wanted_role role"; |
|
126
|
|
|
|
|
|
|
} |
|
127
|
|
|
|
|
|
|
|
|
128
|
6
|
|
|
|
|
1222
|
my $add_method = sprintf 'add_%s_renderer', $type; |
|
129
|
6
|
|
|
|
|
59
|
$self->$add_method($class->new); |
|
130
|
|
|
|
|
|
|
} |
|
131
|
|
|
|
|
|
|
} |
|
132
|
|
|
|
|
|
|
} |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
sub transform_node { |
|
135
|
2
|
|
|
2
|
0
|
18745
|
my $self = shift; |
|
136
|
2
|
|
|
|
|
4
|
my $node = shift; |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
CHILD: |
|
139
|
2
|
|
|
|
|
6
|
foreach my $child (@{ $node->children }) { |
|
|
2
|
|
|
|
|
68
|
|
|
140
|
|
|
|
|
|
|
|
|
141
|
9
|
|
|
|
|
396
|
my $line_start = substr($child->content, 0 => length ($self->command_name) + 1); |
|
142
|
9
|
100
|
|
|
|
393
|
next CHILD if $line_start ne sprintf '%s ', $self->command_name; |
|
143
|
|
|
|
|
|
|
|
|
144
|
5
|
|
|
|
|
187
|
my($prefix, $action, $param, $data) = split m/\h+/, $child->content, 4; |
|
145
|
|
|
|
|
|
|
|
|
146
|
5
|
100
|
66
|
|
|
86
|
if($action eq 'classname' && defined $param) { |
|
147
|
2
|
|
|
2
|
|
183
|
eval "use $param"; |
|
|
2
|
|
|
|
|
521
|
|
|
|
2
|
|
|
|
|
69548
|
|
|
|
2
|
|
|
|
|
33
|
|
|
148
|
2
|
50
|
|
|
|
14
|
die "Can't use $param: $@" if $@; |
|
149
|
|
|
|
|
|
|
|
|
150
|
2
|
|
|
|
|
14
|
$self->classmeta($param->meta); |
|
151
|
2
|
|
|
|
|
89
|
$child->content(''); |
|
152
|
|
|
|
|
|
|
|
|
153
|
2
|
|
|
|
|
305
|
next CHILD; |
|
154
|
|
|
|
|
|
|
} |
|
155
|
3
|
50
|
|
|
|
153
|
next CHILD if !$self->has_classmeta; |
|
156
|
|
|
|
|
|
|
|
|
157
|
3
|
50
|
100
|
|
|
55
|
if($action eq 'attributes' && scalar $self->classmeta->get_attribute_list) { |
|
158
|
|
|
|
|
|
|
|
|
159
|
1
|
|
|
|
|
51
|
my @attributes = map { $self->classmeta->get_attribute($_) } $self->classmeta->get_attribute_list; |
|
|
1
|
|
|
|
|
47
|
|
|
160
|
|
|
|
|
|
|
|
|
161
|
1
|
50
|
|
1
|
|
23
|
my @unwanted = extract_by { $_->does('Documented') && !$_->documentation_order } @attributes; |
|
|
1
|
|
|
|
|
18
|
|
|
162
|
|
|
|
|
|
|
|
|
163
|
1
|
0
|
|
1
|
|
1688
|
my @custom_sort_order_attrs = sort { $a->documentation_order <=> $b->documentation_order || $a->name cmp $b->name } extract_by { $_->does('Documented') && $_->documentation_order < 1000 } @attributes; |
|
|
0
|
50
|
|
|
|
0
|
|
|
|
1
|
|
|
|
|
12
|
|
|
164
|
1
|
0
|
|
0
|
|
269
|
my @docced_not_in_constr_attr = sort { $a->name cmp $b->name } extract_by { !defined $_->init_arg && $_->does('Documented') } @attributes; |
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
165
|
1
|
|
|
0
|
|
15
|
my @not_in_constructor_attrs = sort { $a->name cmp $b->name } extract_by { !defined $_->init_arg } @attributes; |
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
166
|
1
|
|
|
0
|
|
14
|
my @required_attrs = sort { $a->name cmp $b->name } extract_by { $_->is_required } @attributes; |
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
167
|
1
|
|
|
0
|
|
12
|
my @documented_attrs = sort { $a->name cmp $b->name } extract_by { $_->does('Documented') } @attributes; |
|
|
0
|
|
|
|
|
0
|
|
|
|
0
|
|
|
|
|
0
|
|
|
168
|
1
|
|
|
|
|
11
|
my @the_rest = sort { $a->name cmp $b->name } @attributes; |
|
|
0
|
|
|
|
|
0
|
|
|
169
|
|
|
|
|
|
|
|
|
170
|
1
|
|
|
|
|
4
|
my @wanted_attributes = (@custom_sort_order_attrs, @required_attrs, @documented_attrs, @the_rest, @docced_not_in_constr_attr, @not_in_constructor_attrs); |
|
171
|
|
|
|
|
|
|
#* First attributes with documentation |
|
172
|
|
|
|
|
|
|
#* then attributes available in constructor |
|
173
|
|
|
|
|
|
|
#* then required attributes |
|
174
|
|
|
|
|
|
|
#* and then alphabetical |
|
175
|
|
|
|
|
|
|
#my @attribute_names = sort { |
|
176
|
|
|
|
|
|
|
# ($a->does('Documented') && $a->has_documentation_order ? $a->documentation_order : 1000) <=> ($b->does('Documented') && $b->has_documentation_order ? $b->documentation_order : 1000) |
|
177
|
|
|
|
|
|
|
# || ($b->init_arg // 0) <=> ($a->init_arg // 0) |
|
178
|
|
|
|
|
|
|
# || ($b->is_required || 0) <=> ($a->is_required || 0) |
|
179
|
|
|
|
|
|
|
# || $a->name cmp $b->name |
|
180
|
|
|
|
|
|
|
# } |
|
181
|
|
|
|
|
|
|
# map { $self->classmeta->get_attribute($_) } |
|
182
|
|
|
|
|
|
|
# $self->classmeta->get_attribute_list; |
|
183
|
1
|
|
|
|
|
2
|
my $content = ''; |
|
184
|
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
ATTR: |
|
186
|
1
|
|
|
|
|
3
|
foreach my $attr (@wanted_attributes) { |
|
187
|
1
|
50
|
33
|
|
|
4
|
next ATTR if $attr->does('Documented') && $attr->has_documentation_order && $attr->documentation_order == 0; |
|
|
|
|
33
|
|
|
|
|
|
188
|
|
|
|
|
|
|
|
|
189
|
1
|
|
|
|
|
326
|
$content .= sprintf "\n=head2 %s\n", $attr->name; |
|
190
|
1
|
|
|
|
|
5
|
my $prepared_attr = $self->prepare_attr($attr); |
|
191
|
1
|
|
|
|
|
365
|
foreach my $attribute_renderer ($self->all_attribute_renderers) { |
|
192
|
1
|
|
|
|
|
8
|
$content .= $attribute_renderer->render_attribute($prepared_attr); |
|
193
|
|
|
|
|
|
|
} |
|
194
|
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
} |
|
196
|
1
|
|
|
|
|
48
|
$child->content($content); |
|
197
|
|
|
|
|
|
|
} |
|
198
|
|
|
|
|
|
|
|
|
199
|
3
|
100
|
|
|
|
357
|
if($action eq 'method') { |
|
200
|
2
|
50
|
|
|
|
90
|
if(!$self->classmeta->has_method($param)) { |
|
201
|
0
|
|
|
|
|
0
|
$child->content(''); |
|
202
|
0
|
|
|
|
|
0
|
return; |
|
203
|
|
|
|
|
|
|
} |
|
204
|
|
|
|
|
|
|
|
|
205
|
2
|
|
|
|
|
291
|
my $method = $self->classmeta->get_method($param); |
|
206
|
2
|
|
|
|
|
1299
|
my $content = sprintf "\n=head2 %s\n", $method->name; |
|
207
|
2
|
|
|
|
|
11
|
my $prepared_method = $self->prepare_method($method); |
|
208
|
|
|
|
|
|
|
|
|
209
|
2
|
|
|
|
|
123
|
foreach my $method_renderer ($self->all_method_renderers) { |
|
210
|
2
|
|
|
|
|
12
|
$content .= $method_renderer->render_method($prepared_method); |
|
211
|
|
|
|
|
|
|
} |
|
212
|
2
|
|
|
|
|
96
|
$child->content($content); |
|
213
|
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
} |
|
215
|
3
|
50
|
|
|
|
488
|
if($action eq 'methods') { |
|
216
|
0
|
|
|
|
|
0
|
my $content = ''; |
|
217
|
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
METHOD: |
|
219
|
0
|
|
|
|
|
0
|
foreach my $method_name ($self->classmeta->get_method_list) { |
|
220
|
0
|
|
|
|
|
0
|
my $method = $self->classmeta->get_method($method_name); |
|
221
|
0
|
|
|
|
|
0
|
$content = sprintf "\n=head2 %s\n", $method->name; |
|
222
|
0
|
|
|
|
|
0
|
my $prepared_method = $self->prepare_method($method); |
|
223
|
|
|
|
|
|
|
|
|
224
|
0
|
|
|
|
|
0
|
foreach my $method_renderer ($self->all_method_renderers) { |
|
225
|
0
|
|
|
|
|
0
|
$content .= $method_renderer->render_method($prepared_method); |
|
226
|
|
|
|
|
|
|
} |
|
227
|
|
|
|
|
|
|
} |
|
228
|
0
|
|
|
|
|
0
|
$child->content($content); |
|
229
|
|
|
|
|
|
|
} |
|
230
|
|
|
|
|
|
|
} |
|
231
|
|
|
|
|
|
|
} |
|
232
|
|
|
|
|
|
|
sub prepare_attr { |
|
233
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
|
234
|
1
|
|
|
|
|
3
|
my $attr = shift; |
|
235
|
|
|
|
|
|
|
|
|
236
|
1
|
50
|
|
|
|
35
|
my $settings = { |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
type => ($attr->type_constraint ? $self->make_type_string($attr->type_constraint) : undef), |
|
238
|
|
|
|
|
|
|
required_text => $self->required_text($attr->is_required), |
|
239
|
|
|
|
|
|
|
is_text => $self->is_text($attr), |
|
240
|
|
|
|
|
|
|
default => $attr->default, |
|
241
|
|
|
|
|
|
|
is_default_a_coderef => !!$attr->is_default_a_coderef(), |
|
242
|
|
|
|
|
|
|
has_init_arg => defined $attr->init_arg ? 1 : 0, |
|
243
|
|
|
|
|
|
|
documentation_default => $attr->does('Documented') ? $attr->documentation_default : undef, |
|
244
|
|
|
|
|
|
|
}; |
|
245
|
|
|
|
|
|
|
|
|
246
|
1
|
|
|
|
|
360
|
my $documentation_alts = []; |
|
247
|
1
|
50
|
33
|
|
|
6
|
if($attr->does('Documented') && $attr->has_documentation_alts) { |
|
248
|
1
|
|
|
|
|
333
|
my $documentation = $attr->documentation_alts; |
|
249
|
|
|
|
|
|
|
|
|
250
|
1
|
|
|
|
|
8
|
foreach my $key (sort grep { $_ ne '_' } keys %{ $documentation }) { |
|
|
2
|
|
|
|
|
10
|
|
|
|
1
|
|
|
|
|
3
|
|
|
251
|
2
|
|
|
|
|
3
|
push @{ $documentation_alts } => [ $key, $documentation->{ $key } ]; |
|
|
2
|
|
|
|
|
8
|
|
|
252
|
|
|
|
|
|
|
} |
|
253
|
|
|
|
|
|
|
} |
|
254
|
|
|
|
|
|
|
return { |
|
255
|
1
|
50
|
33
|
|
|
7
|
settings => $settings, |
|
256
|
|
|
|
|
|
|
documentation_alts => $documentation_alts, |
|
257
|
|
|
|
|
|
|
$attr->does('Documented') && $attr->has_documentation ? (documentation => $attr->documentation) : (), |
|
258
|
|
|
|
|
|
|
}; |
|
259
|
|
|
|
|
|
|
} |
|
260
|
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
sub prepare_method { |
|
262
|
2
|
|
|
2
|
0
|
5
|
my $self = shift; |
|
263
|
2
|
|
|
|
|
3
|
my $method = shift; |
|
264
|
|
|
|
|
|
|
|
|
265
|
2
|
|
|
|
|
5
|
my $positional_params = []; |
|
266
|
2
|
|
|
|
|
4
|
my $named_params = []; |
|
267
|
|
|
|
|
|
|
|
|
268
|
2
|
|
|
|
|
5
|
my $try_signature = undef; |
|
269
|
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
try { |
|
271
|
2
|
|
|
2
|
|
104
|
$try_signature = $method->signature; |
|
272
|
|
|
|
|
|
|
} |
|
273
|
2
|
|
|
2
|
|
18
|
finally { }; |
|
274
|
2
|
50
|
|
|
|
33
|
return { map { $_ => [] } qw/positional_params named_params return_types/ } if !ref $try_signature; |
|
|
0
|
|
|
|
|
0
|
|
|
275
|
|
|
|
|
|
|
|
|
276
|
2
|
|
|
|
|
11
|
foreach my $param ($method->signature->positional_params) { |
|
277
|
|
|
|
|
|
|
push @$positional_params => { |
|
278
|
|
|
|
|
|
|
name => $param->name, |
|
279
|
3
|
|
|
|
|
199
|
%{ $self->prepare_param($param) }, |
|
|
3
|
|
|
|
|
19
|
|
|
280
|
|
|
|
|
|
|
}; |
|
281
|
|
|
|
|
|
|
} |
|
282
|
2
|
100
|
|
|
|
11
|
if($method->signature->has_slurpy) { |
|
283
|
1
|
|
|
|
|
64
|
my $slurpy = $method->signature->slurpy_param; |
|
284
|
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
push @$positional_params => { |
|
286
|
|
|
|
|
|
|
name => $slurpy->name, |
|
287
|
1
|
|
|
|
|
80
|
%{ $self->prepare_param($slurpy) }, |
|
|
1
|
|
|
|
|
3
|
|
|
288
|
|
|
|
|
|
|
}; |
|
289
|
|
|
|
|
|
|
} |
|
290
|
|
|
|
|
|
|
|
|
291
|
2
|
0
|
|
|
|
77
|
foreach my $param (sort { $a->optional <=> $b->optional || $a->name cmp $b->name } $method->signature->named_params) { |
|
|
3
|
|
|
|
|
120
|
|
|
292
|
3
|
|
|
|
|
17
|
my $name = $param->name; |
|
293
|
3
|
|
|
|
|
19
|
$name =~ s{[\@\$\%]}{}; |
|
294
|
|
|
|
|
|
|
push @$named_params => { |
|
295
|
|
|
|
|
|
|
name => $param->name, |
|
296
|
|
|
|
|
|
|
name_without_sigil => $name, |
|
297
|
3
|
|
|
|
|
9
|
%{ $self->prepare_param($param) }, |
|
|
3
|
|
|
|
|
7
|
|
|
298
|
|
|
|
|
|
|
}; |
|
299
|
|
|
|
|
|
|
} |
|
300
|
|
|
|
|
|
|
|
|
301
|
2
|
|
|
|
|
68
|
my $all_return_types = []; |
|
302
|
2
|
|
|
|
|
10
|
foreach my $return_types ($method->signature->return_types) { |
|
303
|
|
|
|
|
|
|
|
|
304
|
2
|
|
|
|
|
108
|
foreach my $return_type (@$return_types) { |
|
305
|
1
|
50
|
|
|
|
5
|
next if !$return_type->$_can('type'); |
|
306
|
|
|
|
|
|
|
|
|
307
|
1
|
|
|
|
|
32
|
my($docs, $method_doc) = $self->get_docs($return_type); |
|
308
|
1
|
|
|
|
|
6
|
push @$all_return_types => { |
|
309
|
|
|
|
|
|
|
type => $self->make_type_string($return_type->type), |
|
310
|
|
|
|
|
|
|
docs => $docs, |
|
311
|
|
|
|
|
|
|
method_doc => $method_doc, |
|
312
|
|
|
|
|
|
|
}; |
|
313
|
|
|
|
|
|
|
} |
|
314
|
|
|
|
|
|
|
} |
|
315
|
|
|
|
|
|
|
|
|
316
|
2
|
|
|
|
|
8
|
my $data = { |
|
317
|
|
|
|
|
|
|
positional_params => $positional_params, |
|
318
|
|
|
|
|
|
|
named_params => $named_params, |
|
319
|
|
|
|
|
|
|
return_types => $all_return_types, |
|
320
|
|
|
|
|
|
|
}; |
|
321
|
|
|
|
|
|
|
|
|
322
|
2
|
|
|
|
|
7
|
return $data; |
|
323
|
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
} |
|
325
|
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
sub get_docs { |
|
327
|
8
|
|
|
8
|
0
|
12
|
my $self = shift; |
|
328
|
8
|
|
|
|
|
10
|
my $thing = shift; |
|
329
|
|
|
|
|
|
|
|
|
330
|
8
|
|
|
|
|
14
|
my $docs = []; |
|
331
|
8
|
|
|
|
|
11
|
my $method_doc = undef; |
|
332
|
|
|
|
|
|
|
|
|
333
|
8
|
50
|
33
|
|
|
69
|
if(exists $thing->traits->{'doc'} && ref $thing->traits->{'doc'} eq 'ARRAY') { |
|
334
|
8
|
|
|
|
|
10
|
$docs = [ split /\n/ => join "\n" => @{ $thing->traits->{'doc'} } ]; |
|
|
8
|
|
|
|
|
39
|
|
|
335
|
|
|
|
|
|
|
|
|
336
|
8
|
100
|
|
|
|
30
|
if(index ($docs->[-1], 'method_doc|') == 0) { |
|
337
|
1
|
|
|
|
|
3
|
$method_doc = substr pop @{ $docs }, 11; |
|
|
1
|
|
|
|
|
3
|
|
|
338
|
|
|
|
|
|
|
} |
|
339
|
|
|
|
|
|
|
} |
|
340
|
8
|
|
|
|
|
20
|
return ($docs, $method_doc); |
|
341
|
|
|
|
|
|
|
} |
|
342
|
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
sub prepare_param { |
|
344
|
7
|
|
|
7
|
0
|
14
|
my $self = shift; |
|
345
|
7
|
|
|
|
|
8
|
my $param = shift; |
|
346
|
|
|
|
|
|
|
|
|
347
|
7
|
|
|
|
|
18
|
my($docs, $method_doc) = $self->get_docs($param); |
|
348
|
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
my $prepared = { |
|
350
|
|
|
|
|
|
|
type => $self->make_type_string($param->type), |
|
351
|
|
|
|
|
|
|
default => defined $param->default ? $param->default->() : undef, |
|
352
|
|
|
|
|
|
|
default_when => $param->default_when, |
|
353
|
|
|
|
|
|
|
has_default => defined $param->default ? 1 : 0, |
|
354
|
7
|
100
|
33
|
|
|
38
|
traits => [ sort grep { $_ && $_ ne 'doc' && $_ ne 'optional' } ($param->traits, ($param->coerce ? 'coerce' : () ) ) ], |
|
|
7
|
100
|
|
|
|
112
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
required_text => $self->required_text(!$param->optional), |
|
356
|
|
|
|
|
|
|
is_required => !$param->optional, |
|
357
|
|
|
|
|
|
|
method_doc => $method_doc, |
|
358
|
|
|
|
|
|
|
docs => $docs, |
|
359
|
|
|
|
|
|
|
}; |
|
360
|
|
|
|
|
|
|
|
|
361
|
7
|
|
|
|
|
143
|
return $prepared; |
|
362
|
|
|
|
|
|
|
} |
|
363
|
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
sub required_text { |
|
365
|
8
|
|
|
8
|
0
|
50
|
my $self = shift; |
|
366
|
8
|
|
|
|
|
15
|
my $value = shift; |
|
367
|
8
|
100
|
|
|
|
38
|
return $value ? 'required' : 'optional'; |
|
368
|
|
|
|
|
|
|
} |
|
369
|
|
|
|
|
|
|
sub is_text { |
|
370
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
|
371
|
1
|
|
|
|
|
2
|
my $attr = shift; |
|
372
|
|
|
|
|
|
|
|
|
373
|
1
|
50
|
|
|
|
12
|
return $attr->has_write_method ? 'read/write' : 'read-only'; |
|
374
|
|
|
|
|
|
|
} |
|
375
|
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
1; |
|
377
|
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
__END__ |
|
379
|
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
=pod |
|
381
|
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
=encoding UTF-8 |
|
383
|
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
=head1 NAME |
|
385
|
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
Pod::Elemental::Transformer::Splint - Documentation from class metadata |
|
387
|
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
=begin HTML |
|
391
|
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
<p><img src="https://img.shields.io/badge/perl-5.14-brightgreen.svg" alt="Requires Perl 5.14" /> <a href="https://travis-ci.org/Csson/p5-Pod-Elemental-Transformer-Splint"><img src="https://api.travis-ci.org/Csson/p5-Pod-Elemental-Transformer-Splint.svg?branch=master" alt="Travis status" /></a></p> |
|
393
|
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
=end HTML |
|
395
|
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
=begin markdown |
|
398
|
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
 [](https://travis-ci.org/Csson/p5-Pod-Elemental-Transformer-Splint) |
|
400
|
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
=end markdown |
|
402
|
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
=head1 VERSION |
|
404
|
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
Version 0.1003, released 2016-01-11. |
|
406
|
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
408
|
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
# in weaver.ini |
|
410
|
|
|
|
|
|
|
[-Transformer / Splint] |
|
411
|
|
|
|
|
|
|
transformer = Splint |
|
412
|
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
414
|
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
Pod::Elemental::Transformer::Splint uses L<MooseX::AttributeDocumented> to add inlined documentation about attributes to pod. |
|
416
|
|
|
|
|
|
|
If you write your classes with L<Moops> you can also document method signatures with L<Kavorka::TraitFor::Parameter::doc> (and L<::ReturnType::doc|Kavorka::TraitFor::ReturnType::doc>). |
|
417
|
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
A class defined like this: |
|
419
|
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
package My::Class; |
|
421
|
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
use Moose; |
|
423
|
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
has has_brakes => ( |
|
425
|
|
|
|
|
|
|
is => 'ro', |
|
426
|
|
|
|
|
|
|
isa => Bool, |
|
427
|
|
|
|
|
|
|
default => 1, |
|
428
|
|
|
|
|
|
|
traits => ['Documented'], |
|
429
|
|
|
|
|
|
|
documentation => 'Does the bike have brakes?', |
|
430
|
|
|
|
|
|
|
documentation_alts => { |
|
431
|
|
|
|
|
|
|
0 => 'Hopefully a track bike', |
|
432
|
|
|
|
|
|
|
1 => 'Always nice to have', |
|
433
|
|
|
|
|
|
|
}, |
|
434
|
|
|
|
|
|
|
); |
|
435
|
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
=pod |
|
437
|
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
:splint classname My::Class |
|
439
|
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
:splint attributes |
|
441
|
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
=cut |
|
443
|
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
Will render like this (to html): |
|
445
|
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
I<begin> |
|
447
|
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
=begin HTML |
|
449
|
|
|
|
|
|
|
|
|
450
|
|
|
|
|
|
|
<h2 id="has_brakes">has_brakes</h2> |
|
451
|
|
|
|
|
|
|
|
|
452
|
|
|
|
|
|
|
<table cellpadding="0" cellspacing="0"> |
|
453
|
|
|
|
|
|
|
<tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Bool">Bool</a></td> |
|
454
|
|
|
|
|
|
|
<td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional, default: <code>1</code></td> |
|
455
|
|
|
|
|
|
|
<td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">read-only</td> |
|
456
|
|
|
|
|
|
|
<td style="text-align: right; padding-right: 6px; padding-left: 6px;"><code>0</code>:</td> |
|
457
|
|
|
|
|
|
|
<td style="padding-left: 12px;">Hopefully a track bike</td></tr><tr><td> </td> |
|
458
|
|
|
|
|
|
|
<td> </td> |
|
459
|
|
|
|
|
|
|
<td> </td> |
|
460
|
|
|
|
|
|
|
<td style="text-align: right; padding-right: 6px; padding-left: 6px;"><code>1</code>:</td> |
|
461
|
|
|
|
|
|
|
<td style="padding-left: 12px;">Always nice to have</td></tr> |
|
462
|
|
|
|
|
|
|
</table><p>Does the bike have brakes?</p> |
|
463
|
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
=end HTML |
|
465
|
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
I<end> |
|
467
|
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
A L<Moops> class defined like this: |
|
469
|
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
class My::MoopsClass using Moose { |
|
471
|
|
|
|
|
|
|
|
|
472
|
|
|
|
|
|
|
... |
|
473
|
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
method advanced_method(Int $integer does doc("Just an integer\nmethod_doc|This method is advanced."), |
|
475
|
|
|
|
|
|
|
ArrayRef[Str|Bool] $lots_of_stuff does doc('It works with both types'), |
|
476
|
|
|
|
|
|
|
Str :$name! does doc("What's the name"), |
|
477
|
|
|
|
|
|
|
Int :$age does doc('The age of the thing') = 0, |
|
478
|
|
|
|
|
|
|
Str :$pseudonym does doc('Incognito..') |
|
479
|
|
|
|
|
|
|
--> Bool but assumed does doc('Did it succeed?') |
|
480
|
|
|
|
|
|
|
|
|
481
|
|
|
|
|
|
|
) { |
|
482
|
|
|
|
|
|
|
return 1; |
|
483
|
|
|
|
|
|
|
} |
|
484
|
|
|
|
|
|
|
|
|
485
|
|
|
|
|
|
|
method less_advanced($stuff, |
|
486
|
|
|
|
|
|
|
$another_thing does doc("Don't know what we get here"), |
|
487
|
|
|
|
|
|
|
ArrayRef $the_remaining is slurpy does doc('All the remaining') |
|
488
|
|
|
|
|
|
|
) { |
|
489
|
|
|
|
|
|
|
return 1; |
|
490
|
|
|
|
|
|
|
} |
|
491
|
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
... |
|
493
|
|
|
|
|
|
|
} |
|
494
|
|
|
|
|
|
|
|
|
495
|
|
|
|
|
|
|
=pod |
|
496
|
|
|
|
|
|
|
|
|
497
|
|
|
|
|
|
|
:splint classname My::MoopsClass |
|
498
|
|
|
|
|
|
|
|
|
499
|
|
|
|
|
|
|
:splint method advanced_method |
|
500
|
|
|
|
|
|
|
|
|
501
|
|
|
|
|
|
|
It needs lots of documentation. |
|
502
|
|
|
|
|
|
|
|
|
503
|
|
|
|
|
|
|
:splint method less_advanced |
|
504
|
|
|
|
|
|
|
|
|
505
|
|
|
|
|
|
|
=cut |
|
506
|
|
|
|
|
|
|
|
|
507
|
|
|
|
|
|
|
Will render like this (to html): |
|
508
|
|
|
|
|
|
|
|
|
509
|
|
|
|
|
|
|
I<begin> |
|
510
|
|
|
|
|
|
|
|
|
511
|
|
|
|
|
|
|
=begin HTML |
|
512
|
|
|
|
|
|
|
|
|
513
|
|
|
|
|
|
|
<h2 id="advanced_method">advanced_method</h2> |
|
514
|
|
|
|
|
|
|
|
|
515
|
|
|
|
|
|
|
|
|
516
|
|
|
|
|
|
|
|
|
517
|
|
|
|
|
|
|
<p>This method is advanced.</p><table style="margin-bottom: 10px; margin-left: 10px; border-collapse: bollapse;" cellpadding="0" cellspacing="0"> |
|
518
|
|
|
|
|
|
|
<tr style="vertical-align: top;"><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;">Positional parameters</td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td></tr> |
|
519
|
|
|
|
|
|
|
<tr style="vertical-align: top;"> |
|
520
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><code>$integer</code></td> |
|
521
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><a href="https://metacpan.org/pod/Types::Standard#Int">Int</a></td> |
|
522
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;">required</td> |
|
523
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; border-bottom: 1px solid #eee;"></td> |
|
524
|
|
|
|
|
|
|
<td style="padding: 3px 6px; vertical-align: top; border-bottom: 1px solid #eee;">Just an integer<br /></td> |
|
525
|
|
|
|
|
|
|
</tr> |
|
526
|
|
|
|
|
|
|
<tr style="vertical-align: top;"> |
|
527
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><code>$lots_of_stuff</code></td> |
|
528
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><a href="https://metacpan.org/pod/Types::Standard#ArrayRef">ArrayRef</a>[ <a href="https://metacpan.org/pod/Types::Standard#Str">Str</a> | <a href="https://metacpan.org/pod/Types::Standard#Bool">Bool</a> ]</td> |
|
529
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;">required</td> |
|
530
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; border-bottom: 1px solid #eee;"></td> |
|
531
|
|
|
|
|
|
|
<td style="padding: 3px 6px; vertical-align: top; border-bottom: 1px solid #eee;">It works with both types<br /></td> |
|
532
|
|
|
|
|
|
|
</tr> |
|
533
|
|
|
|
|
|
|
<tr style="vertical-align: top;"><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;">Named parameters</td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td></tr> |
|
534
|
|
|
|
|
|
|
<tr style="vertical-align: top;"> |
|
535
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><code>name => $value</code></td> |
|
536
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><a href="https://metacpan.org/pod/Types::Standard#Str">Str</a></td> |
|
537
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;">required</td> |
|
538
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; border-bottom: 1px solid #eee;"></td> |
|
539
|
|
|
|
|
|
|
<td style="padding: 3px 6px; vertical-align: top; border-bottom: 1px solid #eee;">What's the name</td> |
|
540
|
|
|
|
|
|
|
</tr> |
|
541
|
|
|
|
|
|
|
<tr style="vertical-align: top;"> |
|
542
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><code>age => $value</code></td> |
|
543
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><a href="https://metacpan.org/pod/Types::Standard#Int">Int</a></td> |
|
544
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;">optional, default <code>= 0</code></td> |
|
545
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; border-bottom: 1px solid #eee;"></td> |
|
546
|
|
|
|
|
|
|
<td style="padding: 3px 6px; vertical-align: top; border-bottom: 1px solid #eee;">The age of the thing</td> |
|
547
|
|
|
|
|
|
|
</tr> |
|
548
|
|
|
|
|
|
|
<tr style="vertical-align: top;"> |
|
549
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><code>pseudonym => $value</code></td> |
|
550
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><a href="https://metacpan.org/pod/Types::Standard#Str">Str</a></td> |
|
551
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;">optional, <span style="color: #999;">no default</span></td> |
|
552
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; border-bottom: 1px solid #eee;"></td> |
|
553
|
|
|
|
|
|
|
<td style="padding: 3px 6px; vertical-align: top; border-bottom: 1px solid #eee;">Incognito..</td> |
|
554
|
|
|
|
|
|
|
</tr> |
|
555
|
|
|
|
|
|
|
<tr style="vertical-align: top;"><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;">Returns</td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td></tr> |
|
556
|
|
|
|
|
|
|
<tr style="vertical-align: top;"> |
|
557
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; padding: 3px 6px; border-bottom: 1px solid #eee;"><a href="https://metacpan.org/pod/Types::Standard#Bool">Bool</a></td><td style="vertical-align: top; border-right: 1px solid #eee; padding: 3px 6px; border-bottom: 1px solid #eee;"> </td><td style="vertical-align: top; border-right: 1px solid #eee; padding: 3px 6px; border-bottom: 1px solid #eee;"> </td><td style="vertical-align: top; border-right: 1px solid #eee; padding: 3px 6px; border-bottom: 1px solid #eee;"> </td> |
|
558
|
|
|
|
|
|
|
<td style="padding: 3px 6px; vertical-align: top; border-bottom: 1px solid #eee;">Did it succeed?</td> |
|
559
|
|
|
|
|
|
|
</tr> |
|
560
|
|
|
|
|
|
|
</table> |
|
561
|
|
|
|
|
|
|
|
|
562
|
|
|
|
|
|
|
<p>It needs lots of documentation.</p> |
|
563
|
|
|
|
|
|
|
|
|
564
|
|
|
|
|
|
|
<h2 id="less_advanced">less_advanced</h2> |
|
565
|
|
|
|
|
|
|
|
|
566
|
|
|
|
|
|
|
|
|
567
|
|
|
|
|
|
|
|
|
568
|
|
|
|
|
|
|
<p></p><table style="margin-bottom: 10px; margin-left: 10px; border-collapse: bollapse;" cellpadding="0" cellspacing="0"> |
|
569
|
|
|
|
|
|
|
<tr style="vertical-align: top;"><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;">Positional parameters</td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td><td style="text-align: left; color: #444; background-color: #eee; font-weight: bold;"> </td></tr> |
|
570
|
|
|
|
|
|
|
<tr style="vertical-align: top;"> |
|
571
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><code>$stuff</code></td> |
|
572
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"></td> |
|
573
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;">required</td> |
|
574
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; border-bottom: 1px solid #eee;"></td> |
|
575
|
|
|
|
|
|
|
<td style="padding: 3px 6px; vertical-align: top; border-bottom: 1px solid #eee;"></td> |
|
576
|
|
|
|
|
|
|
</tr> |
|
577
|
|
|
|
|
|
|
<tr style="vertical-align: top;"> |
|
578
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><code>$another_thing</code></td> |
|
579
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"></td> |
|
580
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;">required</td> |
|
581
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; border-bottom: 1px solid #eee;"></td> |
|
582
|
|
|
|
|
|
|
<td style="padding: 3px 6px; vertical-align: top; border-bottom: 1px solid #eee;">Don't know what we get here<br /></td> |
|
583
|
|
|
|
|
|
|
</tr> |
|
584
|
|
|
|
|
|
|
<tr style="vertical-align: top;"> |
|
585
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><code>$the_remaining</code></td> |
|
586
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;"><a href="https://metacpan.org/pod/Types::Standard#ArrayRef">ArrayRef</a></td> |
|
587
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;">required</td> |
|
588
|
|
|
|
|
|
|
<td style="vertical-align: top; border-right: 1px solid #eee; white-space: nowrap; padding: 3px 6px; border-bottom: 1px solid #eee;">slurpy</td> |
|
589
|
|
|
|
|
|
|
<td style="padding: 3px 6px; vertical-align: top; border-bottom: 1px solid #eee;">All the remaining<br /></td> |
|
590
|
|
|
|
|
|
|
</tr> |
|
591
|
|
|
|
|
|
|
</table> |
|
592
|
|
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
=end HTML |
|
594
|
|
|
|
|
|
|
|
|
595
|
|
|
|
|
|
|
I<end> |
|
596
|
|
|
|
|
|
|
|
|
597
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
598
|
|
|
|
|
|
|
|
|
599
|
|
|
|
|
|
|
=head1 SOURCE |
|
600
|
|
|
|
|
|
|
|
|
601
|
|
|
|
|
|
|
L<https://github.com/Csson/p5-Pod-Elemental-Transformer-Splint> |
|
602
|
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
=head1 HOMEPAGE |
|
604
|
|
|
|
|
|
|
|
|
605
|
|
|
|
|
|
|
L<https://metacpan.org/release/Pod-Elemental-Transformer-Splint> |
|
606
|
|
|
|
|
|
|
|
|
607
|
|
|
|
|
|
|
=head1 AUTHOR |
|
608
|
|
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
Erik Carlsson <info@code301.com> |
|
610
|
|
|
|
|
|
|
|
|
611
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
612
|
|
|
|
|
|
|
|
|
613
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Erik Carlsson. |
|
614
|
|
|
|
|
|
|
|
|
615
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
616
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
617
|
|
|
|
|
|
|
|
|
618
|
|
|
|
|
|
|
=cut |