line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Function::Interface::Info::Function; |
2
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
179111
|
use v5.14.0; |
|
13
|
|
|
|
|
51
|
|
4
|
13
|
|
|
13
|
|
66
|
use warnings; |
|
13
|
|
|
|
|
23
|
|
|
13
|
|
|
|
|
5112
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "0.04"; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
194
|
|
|
194
|
1
|
48031
|
my ($class, %args) = @_; |
10
|
194
|
|
|
|
|
651
|
bless \%args => $class; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
144
|
|
|
144
|
1
|
819
|
sub subname() { $_[0]->{subname} } |
14
|
76
|
|
|
76
|
1
|
3007
|
sub keyword() { $_[0]->{keyword} } |
15
|
199
|
|
|
199
|
1
|
2702
|
sub params() { $_[0]->{params} } |
16
|
102
|
|
|
102
|
1
|
1337
|
sub return() { $_[0]->{return} } |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub definition() { |
19
|
30
|
|
|
30
|
1
|
52
|
my $self = shift; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sprintf('%s %s(%s) :Return(%s)', |
22
|
|
|
|
|
|
|
$self->keyword, |
23
|
|
|
|
|
|
|
$self->subname, |
24
|
|
|
|
|
|
|
(join ', ', map { |
25
|
6
|
100
|
|
|
|
485
|
sprintf('%s %s%s%s', |
|
|
100
|
|
|
|
|
|
26
|
|
|
|
|
|
|
$_->type_display_name, |
27
|
|
|
|
|
|
|
$_->named ? ':' : '', |
28
|
|
|
|
|
|
|
$_->name, |
29
|
|
|
|
|
|
|
$_->optional ? '=' : '' |
30
|
|
|
|
|
|
|
) |
31
|
30
|
|
|
|
|
66
|
} @{$self->params}), |
32
|
|
|
|
|
|
|
(join ', ', map { |
33
|
3
|
|
|
|
|
137
|
$_->type_display_name, |
34
|
30
|
|
|
|
|
69
|
} @{$self->return}), |
|
30
|
|
|
|
|
2475
|
|
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub positional_required() { |
39
|
39
|
|
|
39
|
1
|
75
|
my $self = shift; |
40
|
39
|
|
100
|
|
|
134
|
$self->{positional_required} //= [ grep { !$_->named && !$_->optional } @{$self->params} ] |
|
23
|
|
100
|
|
|
1801
|
|
|
32
|
|
|
|
|
73
|
|
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub positional_optional() { |
44
|
31
|
|
|
31
|
1
|
1802
|
my $self = shift; |
45
|
31
|
100
|
100
|
|
|
97
|
$self->{positional_optional} //= [ grep { !$_->named && $_->optional } @{$self->params} ] |
|
20
|
|
|
|
|
104
|
|
|
29
|
|
|
|
|
58
|
|
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub named_required() { |
49
|
30
|
|
|
30
|
1
|
1113
|
my $self = shift; |
50
|
30
|
100
|
100
|
|
|
90
|
$self->{named_required} //= [ grep { $_->named && !$_->optional } @{$self->params} ] |
|
19
|
|
|
|
|
438
|
|
|
28
|
|
|
|
|
80
|
|
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub named_optional() { |
54
|
29
|
|
|
29
|
1
|
858
|
my $self = shift; |
55
|
29
|
100
|
100
|
|
|
120
|
$self->{named_optional} //= [ grep { $_->named && $_->optional } @{$self->params} ] |
|
18
|
|
|
|
|
88
|
|
|
27
|
|
|
|
|
51
|
|
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
__END__ |