Junction/None.pm

filter: Statementstmt 100% 78 / 78 Branchbran 100% 50 / 50 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 17 / 17 Podpod 0.0% 0 / 15 totaltotal 90.6% 145 / 160 CC 41 SCAR 12.9
CC
41
Cov
100%
num_eq
4.0
num_ne
4.0
num_ge
4.0
CRAP 3.6
« Junction/Any.pm ↑ Summary Junction/Base.pm »
1 package Perl6::Junction::None;
2 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 8 our $VERSION = '1.60000';
4  
5 8 ▶use base 'Perl6::Junction::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 13 ▶sub num_eq {
Subroutine num_eq: called CC=4 SCAR=13.9
Pod undocumented
8 13 ▶ return regex_eq(@_) if ref( $_[1] ) eq 'Regexp';
Branch: 1 branch
BranchTrueFalseTotal
if ref $_[1] eq "Regexp" 4 9 13
9  
10 9 my ( $self, $test ) = @_;
11  
12 9 for (@$self) {
13 19 ▶ return if $_ == $test;
Branch: 1 branch
BranchTrueFalseTotal
if $_ == $test 3 16 19
14 }
15  
16 6 return 1;
17 }
18  
19 8 ▶sub num_ne {
Subroutine num_ne: called CC=4 SCAR=13.9
Pod undocumented
20 8 ▶ return regex_ne(@_) if ref( $_[1] ) eq 'Regexp';
Branch: 1 branch
BranchTrueFalseTotal
if ref $_[1] eq "Regexp" 6 2 8
21  
22 2 my ( $self, $test ) = @_;
23  
24 2 for (@$self) {
25 3 ▶ return if $_ != $test;
Branch: 1 branch
BranchTrueFalseTotal
if $_ != $test 1 2 3
26 }
27  
28 1 return 1;
29 }
30  
31 13 ▶sub num_ge {
Subroutine num_ge: called CC=4 SCAR=13.9
Pod undocumented
32 13 my ( $self, $test, $switch ) = @_;
33  
34 13 ▶ return num_le( $self, $test ) if $switch;
Branch: 1 branch
BranchTrueFalseTotal
if $switch 5 8 13
35  
36 8 for (@$self) {
37 18 ▶ return if $_ >= $test;
Branch: 1 branch
BranchTrueFalseTotal
if $_ >= $test 5 13 18
38 }
39  
40 3 return 1;
41 }
42  
43 13 ▶sub num_gt {
Subroutine num_gt: called CC=4 SCAR=13.9
Pod undocumented
44 13 my ( $self, $test, $switch ) = @_;
45  
46 13 ▶ return num_lt( $self, $test ) if $switch;
Branch: 1 branch
BranchTrueFalseTotal
if $switch 4 9 13
47  
48 9 for (@$self) {
49 21 ▶ return if $_ > $test;
Branch: 1 branch
BranchTrueFalseTotal
if $_ > $test 5 16 21
50 }
51  
52 4 return 1;
53 }
54  
55 12 ▶sub num_le {
Subroutine num_le: called CC=4 SCAR=13.9
Pod undocumented
56 12 my ( $self, $test, $switch ) = @_;
57  
58 12 ▶ return num_ge( $self, $test ) if $switch;
Branch: 1 branch
BranchTrueFalseTotal
if $switch 4 8 12
59  
60 8 for (@$self) {
61 16 ▶ return if $_ <= $test;
Branch: 1 branch
BranchTrueFalseTotal
if $_ <= $test 4 12 16
62 }
63  
64 4 return 1;
65 }
66  
67 13 ▶sub num_lt {
Subroutine num_lt: called CC=4 SCAR=13.9
Pod undocumented
68 13 my ( $self, $test, $switch ) = @_;
69  
70 13 ▶ return num_gt( $self, $test ) if $switch;
Branch: 1 branch
BranchTrueFalseTotal
if $switch 5 8 13
71  
72 8 for (@$self) {
73 16 ▶ return if $_ < $test;
Branch: 1 branch
BranchTrueFalseTotal
if $_ < $test 4 12 16
74 }
75  
76 4 return 1;
77 }
78  
79 3 ▶sub str_eq {
Subroutine str_eq: called CC=3 SCAR=11.0
Pod undocumented
80 3 my ( $self, $test ) = @_;
81  
82 3 for (@$self) {
83 4 ▶ return if $_ eq $test;
Branch: 1 branch
BranchTrueFalseTotal
if $_ eq $test 2 2 4
84 }
85  
86 1 return 1;
87 }
88  
89 3 ▶sub str_ne {
Subroutine str_ne: called CC=3 SCAR=11.0
Pod undocumented
90 3 my ( $self, $test ) = @_;
91  
92 3 for (@$self) {
93 4 ▶ return if $_ ne $test;
Branch: 1 branch
BranchTrueFalseTotal
if $_ ne $test 2 2 4
94 }
95  
96 1 return 1;
97 }
98  
99 9 ▶sub str_ge {
Subroutine str_ge: called CC=4 SCAR=13.9
Pod undocumented
100 9 my ( $self, $test, $switch ) = @_;
101  
102 9 ▶ return str_le( $self, $test ) if $switch;
Branch: 1 branch
BranchTrueFalseTotal
if $switch 3 6 9
103  
104 6 for (@$self) {
105 8 ▶ return if $_ ge $test;
Branch: 1 branch
BranchTrueFalseTotal
if $_ ge $test 4 4 8
106 }
107  
108 2 return 1;
109 }
110  
111 10 ▶sub str_gt {
Subroutine str_gt: called CC=4 SCAR=13.9
Pod undocumented
112 10 my ( $self, $test, $switch ) = @_;
113  
114 10 ▶ return str_lt( $self, $test ) if $switch;
Branch: 1 branch
BranchTrueFalseTotal
if $switch 3 7 10
115  
116 7 for (@$self) {
117 12 ▶ return if $_ gt $test;
Branch: 1 branch
BranchTrueFalseTotal
if $_ gt $test 4 8 12
118 }
119  
120 3 return 1;
121 }
122  
123 9 ▶sub str_le {
Subroutine str_le: called CC=4 SCAR=13.9
Pod undocumented
124 9 my ( $self, $test, $switch ) = @_;
125  
126 9 ▶ return str_ge( $self, $test ) if $switch;
Branch: 1 branch
BranchTrueFalseTotal
if $switch 3 6 9
127  
128 6 for (@$self) {
129 8 ▶ return if $_ le $test;
Branch: 1 branch
BranchTrueFalseTotal
if $_ le $test 4 4 8
130 }
131  
132 2 return 1;
133 }
134  
135 9 ▶sub str_lt {
Subroutine str_lt: called CC=4 SCAR=13.9
Pod undocumented
136 9 my ( $self, $test, $switch ) = @_;
137  
138 9 ▶ return str_gt( $self, $test ) if $switch;
Branch: 1 branch
BranchTrueFalseTotal
if $switch 3 6 9
139  
140 6 for (@$self) {
141 8 ▶ return if $_ lt $test;
Branch: 1 branch
BranchTrueFalseTotal
if $_ lt $test 4 4 8
142 }
143  
144 2 return 1;
145 }
146  
147 4 ▶sub regex_eq {
Subroutine regex_eq: called CC=3 SCAR=11.0
Pod undocumented
148 4 my ( $self, $test, $switch ) = @_;
149  
150 4 for (@$self) {
151 11 ▶ return if $_ =~ $test;
Branch: 1 branch
BranchTrueFalseTotal
if $_ =~ /$test/ 2 9 11
152 }
153  
154 2 return 1;
155 }
156  
157 6 ▶sub regex_ne {
Subroutine regex_ne: called CC=3 SCAR=11.0
Pod undocumented
158 6 my ( $self, $test, $switch ) = @_;
159  
160 6 for (@$self) {
161 14 ▶ return if $_ !~ $test;
Branch: 1 branch
BranchTrueFalseTotal
unless $_ =~ /$test/ 2 12 14
162 }
163  
164 4 return 1;
165 }
166  
167 2 ▶sub bool {
Subroutine bool: called CC=3 SCAR=11.0
Pod undocumented
168 2 my ($self) = @_;
169  
170 2 for (@$self) {
171 6 ▶ return if $_;
Branch: 1 branch
BranchTrueFalseTotal
if $_ 1 5 6
172 }
173  
174 1 return 1;
175 }
176  
177 8 1;
178  
« Junction/Any.pm ↑ Summary Junction/Base.pm »