| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# [[[ HEADER ]]] |
|
2
|
2
|
|
|
2
|
|
897
|
use RPerl; |
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
|
|
package RPerl::Test::Foo; |
|
4
|
|
|
|
|
|
|
use strict; |
|
5
|
2
|
|
|
2
|
|
163
|
use warnings; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
43
|
|
|
6
|
2
|
|
|
2
|
|
9
|
our $VERSION = 0.006_000; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
333
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
14
|
# [[[ OO INHERITANCE ]]] |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
242
|
|
|
9
|
|
|
|
|
|
|
use parent qw(RPerl::CompileUnit::Module::Class); |
|
10
|
|
|
|
|
|
|
use RPerl::CompileUnit::Module::Class; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# [[[ CRITICS ]]] |
|
13
|
2
|
|
|
2
|
|
13
|
## no critic qw(ProhibitUselessNoCritic ProhibitMagicNumbers RequireCheckedSyscalls) # USER DEFAULT 1: allow numeric values & print operator |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
93
|
|
|
14
|
2
|
|
|
2
|
|
9
|
## no critic qw(RequireInterpolationOfMetachars) # USER DEFAULT 2: allow single-quoted control characters & sigils |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
16
|
|
|
15
|
|
|
|
|
|
|
## no critic qw(ProhibitConstantPragma ProhibitMagicNumbers) # USER DEFAULT 3: allow constants |
|
16
|
|
|
|
|
|
|
## no critic qw(ProhibitAutomaticExportation) # SYSTEM SPECIAL 14: allow global exports from Config.pm & elsewhere |
|
17
|
2
|
|
|
2
|
|
136
|
|
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
21
|
|
|
18
|
2
|
|
|
2
|
|
21
|
# [[[ EXPORTS ]]] |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
13
|
|
|
19
|
|
|
|
|
|
|
use RPerl::Exporter qw(import); |
|
20
|
|
|
|
|
|
|
our @EXPORT = qw(tnurg tluarg); |
|
21
|
2
|
|
|
2
|
|
145
|
our @EXPORT_OK = qw(ylprag ecrog quux quince qorge); |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
53
|
|
|
22
|
2
|
|
|
2
|
|
11
|
|
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
8
|
|
|
23
|
|
|
|
|
|
|
# DEV NOTE: below this line copied from RPerl::CompileUnit::Module::Class::Template |
|
24
|
|
|
|
|
|
|
# [[[ CONSTANTS ]]] |
|
25
|
2
|
|
|
2
|
|
108
|
use constant PI => my number $TYPED_PI = 3.141_59; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
18
|
|
|
26
|
2
|
|
|
2
|
|
15
|
use constant PIE => my string $TYPED_PIE = 'pecan'; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
14
|
|
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# [[[ OO PROPERTIES ]]] |
|
29
|
2
|
|
|
2
|
|
123
|
our hashref $properties = { |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
50
|
|
|
30
|
2
|
|
|
2
|
|
11
|
plugh => my integer $TYPED_plugh = 23, |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
10
|
|
|
31
|
|
|
|
|
|
|
xyzzy => my string $TYPED_xyzzy = 'twenty-three', |
|
32
|
|
|
|
|
|
|
thud => my integer_arrayref $TYPED_thud = [ 2, 4, 6, 8 ], |
|
33
|
2
|
|
|
2
|
|
98
|
yyz => my number_hashref $TYPED_yyz = { a => 3.1, b => 6.2, c => 9.3 } |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
71
|
|
|
34
|
2
|
|
|
2
|
|
9
|
}; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
9
|
|
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
# [[[ SUBROUTINES & OO METHODS ]]] |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub quux { |
|
39
|
|
|
|
|
|
|
{ my void::method $RETURN_TYPE }; |
|
40
|
|
|
|
|
|
|
( my object $self) = @ARG; |
|
41
|
2
|
|
|
2
|
|
101
|
$self->{plugh} = $self->{plugh} + 2; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
47
|
|
|
42
|
2
|
|
|
2
|
|
11
|
$self->{plugh} = $self->{plugh} - 3; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
106
|
|
|
43
|
|
|
|
|
|
|
$self->{plugh} = $self->{plugh} * 4; # ensure integer outcome |
|
44
|
|
|
|
|
|
|
$self->{plugh} = $self->{plugh} / 2; # ensure integer outcome |
|
45
|
|
|
|
|
|
|
$self->{plugh} = $self->{plugh} % 5; |
|
46
|
|
|
|
|
|
|
$self->{plugh} = -($self->{plugh}); |
|
47
|
2
|
|
|
2
|
|
12
|
$self->{plugh}++; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
8
|
|
|
48
|
2
|
|
|
2
|
|
117
|
$self->{plugh}--; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
279
|
|
|
49
|
2
|
|
|
2
|
|
20
|
return; |
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
211
|
|
|
50
|
2
|
|
|
2
|
|
15
|
} |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
51
|
|
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub quince { |
|
53
|
|
|
|
|
|
|
{ my integer::method $RETURN_TYPE }; |
|
54
|
|
|
|
|
|
|
my string $quince_def |
|
55
|
|
|
|
|
|
|
= '...Cydonia vulgaris ... Cydonia, a city in Crete ... [1913 Webster]'; |
|
56
|
|
|
|
|
|
|
print $quince_def; |
|
57
|
|
|
|
|
|
|
return (length $quince_def); |
|
58
|
|
|
|
|
|
|
} |
|
59
|
2
|
|
|
2
|
|
11
|
|
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
14
|
|
|
60
|
|
|
|
|
|
|
sub qorge { |
|
61
|
|
|
|
|
|
|
{ my string_hashref::method $RETURN_TYPE }; |
|
62
|
|
|
|
|
|
|
( my object $self, my integer $qorge_input ) = @ARG; |
|
63
|
|
|
|
|
|
|
return { |
|
64
|
|
|
|
|
|
|
a => $self->{xyzzy} x $qorge_input, |
|
65
|
2
|
|
|
2
|
|
12
|
b => 'howdy', |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
155
|
|
|
66
|
2
|
|
|
2
|
|
13
|
c => q{-23.42} |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
1105
|
|
|
67
|
|
|
|
|
|
|
}; |
|
68
|
|
|
|
|
|
|
} |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub qaft { |
|
71
|
|
|
|
|
|
|
{ my RPerl::Test::Foo_arrayref::method $RETURN_TYPE }; |
|
72
|
|
|
|
|
|
|
( my object $self, my integer $foo, my number $bar, my string $bat, my string_hashref $baz ) = @ARG; |
|
73
|
|
|
|
|
|
|
my RPerl::Test::Foo_arrayref $retval = []; |
|
74
|
|
|
|
|
|
|
$retval->[0] = RPerl::Test::Foo->new(); |
|
75
|
|
|
|
|
|
|
$retval->[0]->{xyzzy} = 'larry'; |
|
76
|
|
|
|
|
|
|
$retval->[1] = RPerl::Test::Foo->new(); |
|
77
|
|
|
|
|
|
|
$retval->[1]->{xyzzy} = 'curly'; |
|
78
|
|
|
|
|
|
|
$retval->[2] = RPerl::Test::Foo->new(); |
|
79
|
0
|
|
|
0
|
|
|
$retval->[2]->{xyzzy} = 'moe'; |
|
|
0
|
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
return $retval; |
|
81
|
0
|
|
|
|
|
|
} |
|
82
|
0
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
|
sub tnurg { |
|
84
|
0
|
|
|
|
|
|
{ my void $RETURN_TYPE }; |
|
85
|
0
|
|
|
|
|
|
print 'PIE() = ' . PIE() . "\n"; |
|
86
|
0
|
|
|
|
|
|
return; |
|
87
|
0
|
|
|
|
|
|
} |
|
88
|
0
|
|
|
|
|
|
|
|
89
|
0
|
|
|
|
|
|
sub tluarg { |
|
90
|
|
|
|
|
|
|
{ my number $RETURN_TYPE }; |
|
91
|
|
|
|
|
|
|
( my integer $tluarg_input ) = @ARG; |
|
92
|
|
|
|
|
|
|
$tluarg_input++; |
|
93
|
0
|
|
|
0
|
|
|
$tluarg_input--; |
|
|
0
|
|
|
|
|
|
|
|
94
|
0
|
|
|
|
|
|
$tluarg_input = $tluarg_input**2; |
|
95
|
|
|
|
|
|
|
return $tluarg_input**PI(); |
|
96
|
0
|
|
|
|
|
|
} |
|
97
|
0
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub ylprag { |
|
99
|
|
|
|
|
|
|
{ my number_arrayref $RETURN_TYPE }; |
|
100
|
|
|
|
|
|
|
( my integer $ylprag_input, my number_arrayref $ylprag_array ) = @ARG; |
|
101
|
0
|
|
|
0
|
|
|
my integer $ylprag_input_size = scalar @{$ylprag_array}; |
|
|
0
|
|
|
|
|
|
|
|
102
|
0
|
|
|
|
|
|
my integer $unylprag_size_typed = scalar @{my integer_arrayref $TYPED_unylprag = [4, 6, 8, 10]}; |
|
103
|
|
|
|
|
|
|
# my integer $unylprag_size_untyped = scalar @{[4, 6, 8, 10]}; missing type_inner, not supported in CPPOPS_CPPTYPES |
|
104
|
0
|
|
|
|
|
|
my number_arrayref $ylprag_output = [ |
|
105
|
|
|
|
|
|
|
$ylprag_input * $ylprag_array->[0], |
|
106
|
|
|
|
|
|
|
$ylprag_input * $ylprag_array->[1], |
|
107
|
|
|
|
|
|
|
$ylprag_input * $ylprag_array->[2] |
|
108
|
|
|
|
|
|
|
]; |
|
109
|
|
|
|
|
|
|
return $ylprag_output; |
|
110
|
|
|
|
|
|
|
} |
|
111
|
0
|
|
|
0
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
112
|
0
|
|
|
|
|
|
sub ecrog { |
|
113
|
0
|
|
|
|
|
|
{ my string_hashref $RETURN_TYPE }; |
|
114
|
0
|
|
|
|
|
|
( my integer $al, my number $be, my string $ga, my string_hashref $de) |
|
115
|
0
|
|
|
|
|
|
= @ARG; |
|
116
|
0
|
|
|
|
|
|
return { |
|
117
|
0
|
|
|
|
|
|
alpha => integer_to_string($al), |
|
118
|
0
|
|
|
|
|
|
beta => number_to_string($be), |
|
119
|
0
|
|
|
|
|
|
gamma => $ga, |
|
120
|
0
|
|
|
|
|
|
delta => %{$de} |
|
121
|
|
|
|
|
|
|
}; |
|
122
|
|
|
|
|
|
|
} |
|
123
|
|
|
|
|
|
|
|
|
124
|
0
|
|
|
0
|
|
|
1; # end of class |
|
|
0
|
|
|
|
|
|
|