line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Function::Interface::Info::Function; |
2
|
|
|
|
|
|
|
|
3
|
19
|
|
|
19
|
|
219933
|
use v5.14.0; |
|
19
|
|
|
|
|
91
|
|
4
|
19
|
|
|
19
|
|
107
|
use warnings; |
|
19
|
|
|
|
|
42
|
|
|
19
|
|
|
|
|
8254
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "0.06"; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
194
|
|
|
194
|
1
|
57533
|
my ($class, %args) = @_; |
10
|
194
|
|
|
|
|
759
|
bless \%args => $class; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
144
|
|
|
144
|
1
|
1009
|
sub subname() { $_[0]->{subname} } |
14
|
76
|
|
|
76
|
1
|
3806
|
sub keyword() { $_[0]->{keyword} } |
15
|
199
|
|
|
199
|
1
|
3309
|
sub params() { $_[0]->{params} } |
16
|
102
|
|
|
102
|
1
|
1663
|
sub return() { $_[0]->{return} } |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub definition() { |
19
|
30
|
|
|
30
|
1
|
70
|
my $self = shift; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sprintf('%s %s(%s) :Return(%s)', |
22
|
|
|
|
|
|
|
$self->keyword, |
23
|
|
|
|
|
|
|
$self->subname, |
24
|
|
|
|
|
|
|
(join ', ', map { |
25
|
6
|
100
|
|
|
|
665
|
sprintf('%s %s%s%s', |
|
|
100
|
|
|
|
|
|
26
|
|
|
|
|
|
|
$_->type_display_name, |
27
|
|
|
|
|
|
|
$_->named ? ':' : '', |
28
|
|
|
|
|
|
|
$_->name, |
29
|
|
|
|
|
|
|
$_->optional ? '=' : '' |
30
|
|
|
|
|
|
|
) |
31
|
30
|
|
|
|
|
72
|
} @{$self->params}), |
32
|
|
|
|
|
|
|
(join ', ', map { |
33
|
3
|
|
|
|
|
165
|
$_->type_display_name, |
34
|
30
|
|
|
|
|
89
|
} @{$self->return}), |
|
30
|
|
|
|
|
2938
|
|
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub positional_required() { |
39
|
39
|
|
|
39
|
1
|
111
|
my $self = shift; |
40
|
39
|
|
100
|
|
|
134
|
$self->{positional_required} //= [ grep { !$_->named && !$_->optional } @{$self->params} ] |
|
23
|
|
100
|
|
|
2182
|
|
|
32
|
|
|
|
|
67
|
|
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub positional_optional() { |
44
|
31
|
|
|
31
|
1
|
2025
|
my $self = shift; |
45
|
31
|
100
|
100
|
|
|
99
|
$self->{positional_optional} //= [ grep { !$_->named && $_->optional } @{$self->params} ] |
|
20
|
|
|
|
|
124
|
|
|
29
|
|
|
|
|
77
|
|
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub named_required() { |
49
|
30
|
|
|
30
|
1
|
1354
|
my $self = shift; |
50
|
30
|
100
|
100
|
|
|
84
|
$self->{named_required} //= [ grep { $_->named && !$_->optional } @{$self->params} ] |
|
19
|
|
|
|
|
548
|
|
|
28
|
|
|
|
|
60
|
|
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub named_optional() { |
54
|
29
|
|
|
29
|
1
|
1042
|
my $self = shift; |
55
|
29
|
100
|
100
|
|
|
114
|
$self->{named_optional} //= [ grep { $_->named && $_->optional } @{$self->params} ] |
|
18
|
|
|
|
|
146
|
|
|
27
|
|
|
|
|
56
|
|
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
__END__ |