IMAPClient/Thread.pm

filter: Statementstmt 88.7% 355 / 400 Branchbran 47.7% 106 / 222 Conditioncond 45.3% 34 / 75 MC/DCmcdc 13.6% 6 / 44 Subroutinesub 90.4% 19 / 21 Podpod 0.0% 0 / 1 totaltotal 68.1% 520 / 763 SCAR 64.1
CC
139
Cov
71%
thread
110.4
start
92.3
threadmember
61.0
CRAP 609.3
« IMAPClient/BodyStructure/Parse.pm ↑ Summary IMAPClient/BodyStructure.pm »
1 package Mail::IMAPClient::Thread;
2 1 ▶use Parse::RecDescent;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 { my $ERRORS;
4  
5  
6 package Parse::RecDescent::Mail::IMAPClient::Thread;
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use vars qw($skip $AUTOLOAD );
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 @Parse::RecDescent::Mail::IMAPClient::Thread::ISA = ();
10 1 $skip = '\s*';
11  
12  
13 {
14 0 ▶local $SIG{__WARN__} = sub {0};
Subroutine __ANON__: not called CC=1 SCAR=0.4
15 # PRETEND TO BE IN Parse::RecDescent NAMESPACE
16 *Parse::RecDescent::Mail::IMAPClient::Thread::AUTOLOAD = sub
17 {
18 1 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 0 ▶ ${"AUTOLOAD"} =~ s/^Parse::RecDescent::Mail::IMAPClient::Thread/Parse::RecDescent/;
Subroutine __ANON__: not called CC=1 SCAR=6.9
21 0 goto &{${"AUTOLOAD"}};
22 }
23 1 }
24  
25 1 push @Parse::RecDescent::Mail::IMAPClient::Thread::ISA, 'Parse::RecDescent';
26 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
27 sub Parse::RecDescent::Mail::IMAPClient::Thread::thread
28 {
29 134 ▶ my $thisparser = $_[0];
Subroutine thread: called CC=45 SCAR=47.0
30 1 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
31 134 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel || 0
l!l
1340
MC/DC0%0/1
$Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel || 0
$Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel
Truth table50%1/2
A
A= $Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel
Aresult
11
00
32 134 $ERRORS = 0;
33 134 my $thisrule = $thisparser->{"rules"}{"thread"};
34  
35 134 ▶ Parse::RecDescent::_trace(q{Trying rule: [thread]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 134 134
36 Parse::RecDescent::_tracefirst($_[1]),
37 q{thread},
38 $tracelevel)
39 if defined $::RD_TRACE;
40  
41
42 134 my $err_at = @{$thisparser->{errors}};
43  
44 134 my $score;
45 my $score_return;
46 134 my $_tok;
47 134 my $return = undef;
48 134 my $_matched=0;
49 134 my $commit=0;
50 134 my @item = ();
51 134 my %item = ();
52 134 my $repeating = $_[2];
53 134 my $_noactions = $_[3];
54 134 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 134 0 134
55 134 my $_itempos = $_[5];
56 134 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 134 0 134
57 134 my $text;
58 my $lastsep;
59 134 my $current_match;
60 134 my $expectation = new Parse::RecDescent::Expectation(q{'('});
61 134 $expectation->at($_[1]);
62
63 134 my $thisline;
64 134 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
65  
66
67  
68 134 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 134 0 134
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00134
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
69 {
70
71 134 ▶ Parse::RecDescent::_trace(q{Trying production: ['(' threadmember ')']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 134 134
72 Parse::RecDescent::_tracefirst($_[1]),
73 q{thread},
74 $tracelevel)
75 if defined $::RD_TRACE;
76 134 my $thisprod = $thisrule->{"prods"}[0];
77 134 $text = $_[1];
78 134 my $_savetext;
79 134 @item = (q{thread});
80 134 %item = (__RULE__ => q{thread});
81 134 my $repcount = 0;
82  
83  
84 134 ▶ Parse::RecDescent::_trace(q{Trying terminal: ['(']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 134 134
85 Parse::RecDescent::_tracefirst($text),
86 q{thread},
87 $tracelevel)
88 if defined $::RD_TRACE;
89 134 undef $lastsep;
90 134 $expectation->is(q{})->at($text);
91
92  
93 134 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = "("; 1 } and
Branch: 2 branches
BranchTrueFalseTotal
unless ($text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and do { $_tok = "("; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }) 68 66 134
$lastsep = $1 and "" 3 131 134
Condition55%5/9
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and do { $_tok = "("; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }
!ll&&!rl&&r
68066
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and do { $_tok = "("; 1 } and substr($text, 0, length $_tok) eq $_tok
!ll&&!rl&&r
06866
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and do { $_tok = "("; 1 }
!ll&&!rl&&r
00134
MC/DC25%1/4
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and do { $_tok = "("; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e do { $_tok = "("; 1 } substr($text, 0, length $_tok) eq $_tok do { substr($text, 0, length $_tok) = ""; 1 }
Truth table40%2/5
A and B and C and D
A= $text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/eB= do { $_tok = "("; 1 }C= substr($text, 0, length $_tok) eq $_tokD= do { substr($text, 0, length $_tok) = ""; 1 }
ABCDresult
0XXX0
10XX0
110X0
11100
11111
94 substr($text,0,length($_tok)) eq $_tok and
95 66 do { substr($text,0,length($_tok)) = ""; 1; }
96 )
97 {
98 68 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 68 0 68
99
100 68 $expectation->failed();
101 68 ▶ Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 68 68
102 Parse::RecDescent::_tracefirst($text))
103 if defined $::RD_TRACE;
104 68 last;
105 }
106 66 ▶ Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 66 66
107 . $_tok . q{])},
108 Parse::RecDescent::_tracefirst($text))
109 if defined $::RD_TRACE;
110 66 push @item, $item{__STRING1__}=$_tok;
111
112  
113 66 ▶ Parse::RecDescent::_trace(q{Trying repeated subrule: [threadmember]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 66 66
114 Parse::RecDescent::_tracefirst($text),
115 q{thread},
116 $tracelevel)
117 if defined $::RD_TRACE;
118 66 $expectation->is(q{threadmember})->at($text);
119
120 66 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::Thread::threadmember, 1, 100000000, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::Thread::threadmember, 1, 100000000, $_noactions, $expectation, sub { \@arg; } , undef))) 0 66 66
121 {
122 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [threadmember]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
123 Parse::RecDescent::_tracefirst($text),
124 q{thread},
125 $tracelevel)
126 if defined $::RD_TRACE;
127 0 last;
128 }
129 66 ▶ Parse::RecDescent::_trace(q{>>Matched repeated subrule: [threadmember]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 66 66
130 . @$_tok . q{ times)},
131  
132 Parse::RecDescent::_tracefirst($text),
133 q{thread},
134 $tracelevel)
135 if defined $::RD_TRACE;
136 66 $item{q{threadmember(s)}} = $_tok;
137 66 push @item, $_tok;
138
139  
140  
141 66 ▶ Parse::RecDescent::_trace(q{Trying terminal: [')']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 66 66
142 Parse::RecDescent::_tracefirst($text),
143 q{thread},
144 $tracelevel)
145 if defined $::RD_TRACE;
146 66 undef $lastsep;
147 66 $expectation->is(q{')'})->at($text);
148
149  
150 66 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and do { $_tok = ")"; 1 } and
Branch: 2 branches
BranchTrueFalseTotal
unless ($text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and do { $_tok = ")"; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }) 0 66 66
$lastsep = $1 and "" 0 66 66
Condition33%3/9
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and do { $_tok = ")"; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }
!ll&&!rl&&r
0066
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and do { $_tok = ")"; 1 } and substr($text, 0, length $_tok) eq $_tok
!ll&&!rl&&r
0066
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and do { $_tok = ")"; 1 }
!ll&&!rl&&r
0066
MC/DC0%0/4
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and do { $_tok = ")"; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e do { $_tok = ")"; 1 } substr($text, 0, length $_tok) eq $_tok do { substr($text, 0, length $_tok) = ""; 1 }
Truth table20%1/5
A and B and C and D
A= $text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/eB= do { $_tok = ")"; 1 }C= substr($text, 0, length $_tok) eq $_tokD= do { substr($text, 0, length $_tok) = ""; 1 }
ABCDresult
0XXX0
10XX0
110X0
11100
11111
151 substr($text,0,length($_tok)) eq $_tok and
152 66 do { substr($text,0,length($_tok)) = ""; 1; }
153 )
154 {
155 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
156
157 0 $expectation->failed();
158 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
159 Parse::RecDescent::_tracefirst($text))
160 if defined $::RD_TRACE;
161 0 last;
162 }
163 66 ▶ Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 66 66
164 . $_tok . q{])},
165 Parse::RecDescent::_tracefirst($text))
166 if defined $::RD_TRACE;
167 66 push @item, $item{__STRING2__}=$_tok;
168
169  
170 66 ▶ Parse::RecDescent::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 66 66
171 Parse::RecDescent::_tracefirst($text),
172 q{thread},
173 $tracelevel)
174 if defined $::RD_TRACE;
175
176  
177 66 ▶ $_tok = ($_noactions) ? 0 : do {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 66 66
178 66 ▶ $return = $item{'threadmember(s)'}||undef;
Condition50%1/2
$item{'threadmember(s)'} || undef
l!l
660
MC/DC0%0/1
$item{'threadmember(s)'} || undef
$item{'threadmember(s)'}
Truth table50%1/2
A
A= $item{'threadmember(s)'}
Aresult
11
00
179 };
180 66 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 66 66
181 {
182 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
183 if defined $::RD_TRACE;
184 0 last;
185 }
186 66 ▶ Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 66 66
187 . $_tok . q{])},
188 Parse::RecDescent::_tracefirst($text))
189 if defined $::RD_TRACE;
190 66 push @item, $_tok;
191 66 $item{__ACTION1__}=$_tok;
192
193  
194 66 ▶ Parse::RecDescent::_trace(q{>>Matched production: ['(' threadmember ')']<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 66 66
195 Parse::RecDescent::_tracefirst($text),
196 q{thread},
197 $tracelevel)
198 if defined $::RD_TRACE;
199  
200  
201  
202 66 $_matched = 1;
203 66 last;
204 }
205  
206  
207 134 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 68 66 134
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
66068
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
208 {
209
210  
211 68 $_[1] = $text; # NOT SURE THIS IS NEEDED
212 68 ▶ Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 68 68
213 Parse::RecDescent::_tracefirst($_[1]),
214 q{thread},
215 $tracelevel)
216 if defined $::RD_TRACE;
217 68 return undef;
218 }
219 66 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 66 66
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
6600
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
220 {
221 0 ▶ Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
222 q{thread},
223 $tracelevel)
224 if defined $::RD_TRACE;
225 0 $return = $score_return;
226 }
227 66 splice @{$thisparser->{errors}}, $err_at;
228 66 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 66 66
229 66 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 66 66
230 {
231 0 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
232 $return . q{])}, "",
233 q{thread},
234 $tracelevel);
235 0 Parse::RecDescent::_trace(q{(consumed: [} .
236 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
237 Parse::RecDescent::_tracefirst($text),
238 , q{thread},
239 $tracelevel)
240 }
241 66 $_[1] = $text;
242 66 return $return;
243 }
244  
245 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
246 sub Parse::RecDescent::Mail::IMAPClient::Thread::threadmember
247 {
248 170 ▶ my $thisparser = $_[0];
Subroutine threadmember: called CC=39 SCAR=41.1
249 1 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
250 170 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel || 0
l!l
1700
MC/DC0%0/1
$Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel || 0
$Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel
Truth table50%1/2
A
A= $Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel
Aresult
11
00
251 170 $ERRORS = 0;
252 170 my $thisrule = $thisparser->{"rules"}{"threadmember"};
253  
254 170 ▶ Parse::RecDescent::_trace(q{Trying rule: [threadmember]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 170 170
255 Parse::RecDescent::_tracefirst($_[1]),
256 q{threadmember},
257 $tracelevel)
258 if defined $::RD_TRACE;
259  
260
261 170 my $err_at = @{$thisparser->{errors}};
262  
263 170 my $score;
264 my $score_return;
265 170 my $_tok;
266 170 my $return = undef;
267 170 my $_matched=0;
268 170 my $commit=0;
269 170 my @item = ();
270 170 my %item = ();
271 170 my $repeating = $_[2];
272 170 my $_noactions = $_[3];
273 170 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 170 0 170
274 170 my $_itempos = $_[5];
275 170 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 170 0 170
276 170 my $text;
277 my $lastsep;
278 170 my $current_match;
279 170 my $expectation = new Parse::RecDescent::Expectation(q{NUMBER, or thread});
280 170 $expectation->at($_[1]);
281
282 170 my $thisline;
283 170 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
284  
285
286  
287 170 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 170 0 170
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00170
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
288 {
289
290 170 ▶ Parse::RecDescent::_trace(q{Trying production: [NUMBER]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 170 170
291 Parse::RecDescent::_tracefirst($_[1]),
292 q{threadmember},
293 $tracelevel)
294 if defined $::RD_TRACE;
295 170 my $thisprod = $thisrule->{"prods"}[0];
296 170 $text = $_[1];
297 170 my $_savetext;
298 170 @item = (q{threadmember});
299 170 %item = (__RULE__ => q{threadmember});
300 170 my $repcount = 0;
301  
302  
303 170 ▶ Parse::RecDescent::_trace(q{Trying subrule: [NUMBER]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 170 170
304 Parse::RecDescent::_tracefirst($text),
305 q{threadmember},
306 $tracelevel)
307 if defined $::RD_TRACE;
308 1 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
309 170 $expectation->is(q{})->at($text);
310 170 ▶ unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::Thread::NUMBER($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = NUMBER($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 84 86 170
311 {
312
313 84 ▶ Parse::RecDescent::_trace(q{<<Didn't match subrule: [NUMBER]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 84 84
314 Parse::RecDescent::_tracefirst($text),
315 q{threadmember},
316 $tracelevel)
317 if defined $::RD_TRACE;
318 84 $expectation->failed();
319 84 last;
320 }
321 86 ▶ Parse::RecDescent::_trace(q{>>Matched subrule: [NUMBER]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 86 86
322 . $_tok . q{]},
323  
324 Parse::RecDescent::_tracefirst($text),
325 q{threadmember},
326 $tracelevel)
327 if defined $::RD_TRACE;
328 86 $item{q{NUMBER}} = $_tok;
329 86 push @item, $_tok;
330
331 }
332  
333 86 ▶ Parse::RecDescent::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 86 86
334 Parse::RecDescent::_tracefirst($text),
335 q{threadmember},
336 $tracelevel)
337 if defined $::RD_TRACE;
338
339  
340 86 ▶ $_tok = ($_noactions) ? 0 : do { $return = $item{NUMBER} ; };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 86 86
341 86 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 86 86
342 {
343 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
344 if defined $::RD_TRACE;
345 0 last;
346 }
347 86 ▶ Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 86 86
348 . $_tok . q{])},
349 Parse::RecDescent::_tracefirst($text))
350 if defined $::RD_TRACE;
351 86 push @item, $_tok;
352 86 $item{__ACTION1__}=$_tok;
353
354  
355 86 ▶ Parse::RecDescent::_trace(q{>>Matched production: [NUMBER]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 86 86
356 Parse::RecDescent::_tracefirst($text),
357 q{threadmember},
358 $tracelevel)
359 if defined $::RD_TRACE;
360  
361  
362  
363 86 $_matched = 1;
364 86 last;
365 }
366  
367  
368 170 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 84 86 170
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
86084
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
369 {
370
371 84 ▶ Parse::RecDescent::_trace(q{Trying production: [thread]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 84 84
372 Parse::RecDescent::_tracefirst($_[1]),
373 q{threadmember},
374 $tracelevel)
375 if defined $::RD_TRACE;
376 84 my $thisprod = $thisrule->{"prods"}[1];
377 84 $text = $_[1];
378 84 my $_savetext;
379 84 @item = (q{threadmember});
380 84 %item = (__RULE__ => q{threadmember});
381 84 my $repcount = 0;
382  
383  
384 84 ▶ Parse::RecDescent::_trace(q{Trying subrule: [thread]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 84 84
385 Parse::RecDescent::_tracefirst($text),
386 q{threadmember},
387 $tracelevel)
388 if defined $::RD_TRACE;
389 1 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
390 84 $expectation->is(q{})->at($text);
391 84 ▶ unless (defined ($_tok = Parse::RecDescent::Mail::IMAPClient::Thread::thread($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = thread($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 66 18 84
392 {
393
394 66 ▶ Parse::RecDescent::_trace(q{<<Didn't match subrule: [thread]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 66 66
395 Parse::RecDescent::_tracefirst($text),
396 q{threadmember},
397 $tracelevel)
398 if defined $::RD_TRACE;
399 66 $expectation->failed();
400 66 last;
401 }
402 18 ▶ Parse::RecDescent::_trace(q{>>Matched subrule: [thread]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 18 18
403 . $_tok . q{]},
404  
405 Parse::RecDescent::_tracefirst($text),
406 q{threadmember},
407 $tracelevel)
408 if defined $::RD_TRACE;
409 18 $item{q{thread}} = $_tok;
410 18 push @item, $_tok;
411
412 }
413  
414 18 ▶ Parse::RecDescent::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 18 18
415 Parse::RecDescent::_tracefirst($text),
416 q{threadmember},
417 $tracelevel)
418 if defined $::RD_TRACE;
419
420  
421 18 ▶ $_tok = ($_noactions) ? 0 : do { $return = $item{thread} ; };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 18 18
422 18 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 18 18
423 {
424 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
425 if defined $::RD_TRACE;
426 0 last;
427 }
428 18 ▶ Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 18 18
429 . $_tok . q{])},
430 Parse::RecDescent::_tracefirst($text))
431 if defined $::RD_TRACE;
432 18 push @item, $_tok;
433 18 $item{__ACTION1__}=$_tok;
434
435  
436 18 ▶ Parse::RecDescent::_trace(q{>>Matched production: [thread]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 18 18
437 Parse::RecDescent::_tracefirst($text),
438 q{threadmember},
439 $tracelevel)
440 if defined $::RD_TRACE;
441  
442  
443  
444 18 $_matched = 1;
445 18 last;
446 }
447  
448  
449 170 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 66 104 170
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
104066
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
450 {
451
452  
453 66 $_[1] = $text; # NOT SURE THIS IS NEEDED
454 66 ▶ Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 66 66
455 Parse::RecDescent::_tracefirst($_[1]),
456 q{threadmember},
457 $tracelevel)
458 if defined $::RD_TRACE;
459 66 return undef;
460 }
461 104 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 104 104
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
10400
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
462 {
463 0 ▶ Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
464 q{threadmember},
465 $tracelevel)
466 if defined $::RD_TRACE;
467 0 $return = $score_return;
468 }
469 104 splice @{$thisparser->{errors}}, $err_at;
470 104 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 104 104
471 104 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 104 104
472 {
473 0 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
474 $return . q{])}, "",
475 q{threadmember},
476 $tracelevel);
477 0 Parse::RecDescent::_trace(q{(consumed: [} .
478 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
479 Parse::RecDescent::_tracefirst($text),
480 , q{threadmember},
481 $tracelevel)
482 }
483 104 $_[1] = $text;
484 104 return $return;
485 }
486  
487 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
488 sub Parse::RecDescent::Mail::IMAPClient::Thread::NUMBER
489 {
490 170 ▶ my $thisparser = $_[0];
Subroutine NUMBER: called CC=24 SCAR=34.3
491 1 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
492 170 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel || 0
l!l
1700
MC/DC0%0/1
$Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel || 0
$Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel
Truth table50%1/2
A
A= $Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel
Aresult
11
00
493 170 $ERRORS = 0;
494 170 my $thisrule = $thisparser->{"rules"}{"NUMBER"};
495  
496 170 ▶ Parse::RecDescent::_trace(q{Trying rule: [NUMBER]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 170 170
497 Parse::RecDescent::_tracefirst($_[1]),
498 q{NUMBER},
499 $tracelevel)
500 if defined $::RD_TRACE;
501  
502
503 170 my $err_at = @{$thisparser->{errors}};
504  
505 170 my $score;
506 my $score_return;
507 170 my $_tok;
508 170 my $return = undef;
509 170 my $_matched=0;
510 170 my $commit=0;
511 170 my @item = ();
512 170 my %item = ();
513 170 my $repeating = $_[2];
514 170 my $_noactions = $_[3];
515 170 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 170 0 170
516 170 my $_itempos = $_[5];
517 170 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 170 0 170
518 170 my $text;
519 my $lastsep;
520 170 my $current_match;
521 170 my $expectation = new Parse::RecDescent::Expectation(q{/\\d+/});
522 170 $expectation->at($_[1]);
523
524 170 my $thisline;
525 170 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
526  
527
528  
529 170 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 170 0 170
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00170
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
530 {
531
532 170 ▶ Parse::RecDescent::_trace(q{Trying production: [/\\d+/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 170 170
533 Parse::RecDescent::_tracefirst($_[1]),
534 q{NUMBER},
535 $tracelevel)
536 if defined $::RD_TRACE;
537 170 my $thisprod = $thisrule->{"prods"}[0];
538 170 $text = $_[1];
539 170 my $_savetext;
540 170 @item = (q{NUMBER});
541 170 %item = (__RULE__ => q{NUMBER});
542 170 my $repcount = 0;
543  
544  
545 170 ▶ Parse::RecDescent::_trace(q{Trying terminal: [/\\d+/]}, Parse::RecDescent::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 170 170
546 q{NUMBER},
547 $tracelevel)
548 if defined $::RD_TRACE;
549 170 undef $lastsep;
550 170 $expectation->is(q{})->at($text);
551
552  
553 170 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\d+)/)
Branch: 2 branches
BranchTrueFalseTotal
unless ($text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\d+)/) 84 86 170
$lastsep = $1 and "" 25 145 170
Condition66%2/3
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\d+)/
!ll&&!rl&&r
08486
MC/DC50%1/2
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\d+)/
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:\d+)/
Truth table66%2/3
A and B
A= $text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:\d+)/
ABresult
0X0
100
111
554 {
555 84 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 84 0 84
556 84 $expectation->failed();
557 84 ▶ Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 84 84
558 Parse::RecDescent::_tracefirst($text))
559 if defined $::RD_TRACE;
560  
561 84 last;
562 }
563 86 $current_match = substr($text, $-[0], $+[0] - $-[0]);
564 86 substr($text,0,length($current_match),q{});
565 86 ▶ Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 86 86
566 . $current_match . q{])},
567 Parse::RecDescent::_tracefirst($text))
568 if defined $::RD_TRACE;
569 86 push @item, $item{__PATTERN1__}=$current_match;
570
571  
572 86 ▶ Parse::RecDescent::_trace(q{>>Matched production: [/\\d+/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 86 86
573 Parse::RecDescent::_tracefirst($text),
574 q{NUMBER},
575 $tracelevel)
576 if defined $::RD_TRACE;
577  
578  
579  
580 86 $_matched = 1;
581 86 last;
582 }
583  
584  
585 170 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 84 86 170
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
86084
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
586 {
587
588  
589 84 $_[1] = $text; # NOT SURE THIS IS NEEDED
590 84 ▶ Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 84 84
591 Parse::RecDescent::_tracefirst($_[1]),
592 q{NUMBER},
593 $tracelevel)
594 if defined $::RD_TRACE;
595 84 return undef;
596 }
597 86 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 86 86
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
0860
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
598 {
599 0 ▶ Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
600 q{NUMBER},
601 $tracelevel)
602 if defined $::RD_TRACE;
603 0 $return = $score_return;
604 }
605 86 splice @{$thisparser->{errors}}, $err_at;
606 86 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 86 0 86
607 86 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 86 86
608 {
609 0 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
610 $return . q{])}, "",
611 q{NUMBER},
612 $tracelevel);
613 0 Parse::RecDescent::_trace(q{(consumed: [} .
614 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
615 Parse::RecDescent::_tracefirst($text),
616 , q{NUMBER},
617 $tracelevel)
618 }
619 86 $_[1] = $text;
620 86 return $return;
621 }
622  
623 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
624 sub Parse::RecDescent::Mail::IMAPClient::Thread::start
625 {
626 2 ▶ my $thisparser = $_[0];
Subroutine start: called CC=34 SCAR=45.2
627 1 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
628 2 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel || 0
l!l
02
MC/DC0%0/1
$Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel || 0
$Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel
Truth table50%1/2
A
A= $Parse::RecDescent::Mail::IMAPClient::Thread::tracelevel
Aresult
11
00
629 2 $ERRORS = 0;
630 2 my $thisrule = $thisparser->{"rules"}{"start"};
631  
632 2 ▶ Parse::RecDescent::_trace(q{Trying rule: [start]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
633 Parse::RecDescent::_tracefirst($_[1]),
634 q{start},
635 $tracelevel)
636 if defined $::RD_TRACE;
637  
638
639 2 my $err_at = @{$thisparser->{errors}};
640  
641 2 my $score;
642 my $score_return;
643 2 my $_tok;
644 2 my $return = undef;
645 2 my $_matched=0;
646 2 my $commit=0;
647 2 my @item = ();
648 2 my %item = ();
649 2 my $repeating = $_[2];
650 2 my $_noactions = $_[3];
651 2 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 2 0 2
652 2 my $_itempos = $_[5];
653 2 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 2 0 2
654 2 my $text;
655 my $lastsep;
656 2 my $current_match;
657 2 my $expectation = new Parse::RecDescent::Expectation(q{/^\\* THREAD /i});
658 2 $expectation->at($_[1]);
659
660 2 my $thisline;
661 2 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
662  
663
664  
665 2 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 2 0 2
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
002
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
666 {
667
668 2 ▶ Parse::RecDescent::_trace(q{Trying production: [/^\\* THREAD /i thread]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
669 Parse::RecDescent::_tracefirst($_[1]),
670 q{start},
671 $tracelevel)
672 if defined $::RD_TRACE;
673 2 my $thisprod = $thisrule->{"prods"}[0];
674 2 $text = $_[1];
675 2 my $_savetext;
676 2 @item = (q{start});
677 2 %item = (__RULE__ => q{start});
678 2 my $repcount = 0;
679  
680  
681 2 ▶ Parse::RecDescent::_trace(q{Trying terminal: [/^\\* THREAD /i]}, Parse::RecDescent::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
682 q{start},
683 $tracelevel)
684 if defined $::RD_TRACE;
685 2 undef $lastsep;
686 2 $expectation->is(q{})->at($text);
687
688  
689 2 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^\* THREAD )/i)
Branch: 2 branches
BranchTrueFalseTotal
unless ($text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^\* THREAD )/i) 0 2 2
$lastsep = $1 and "" 0 2 2
Condition33%1/3
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^\* THREAD )/i
!ll&&!rl&&r
002
MC/DC0%0/2
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^\* THREAD )/i
$text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:^\* THREAD )/i
Truth table33%1/3
A and B
A= $text =~ s/\A($Parse::RecDescent::Mail::IMAPClient::Thread::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:^\* THREAD )/i
ABresult
0X0
100
111
690 {
691 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
692 0 $expectation->failed();
693 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
694 Parse::RecDescent::_tracefirst($text))
695 if defined $::RD_TRACE;
696  
697 0 last;
698 }
699 2 $current_match = substr($text, $-[0], $+[0] - $-[0]);
700 2 substr($text,0,length($current_match),q{});
701 2 ▶ Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
702 . $current_match . q{])},
703 Parse::RecDescent::_tracefirst($text))
704 if defined $::RD_TRACE;
705 2 push @item, $item{__PATTERN1__}=$current_match;
706
707  
708 2 ▶ Parse::RecDescent::_trace(q{Trying repeated subrule: [thread]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
709 Parse::RecDescent::_tracefirst($text),
710 q{start},
711 $tracelevel)
712 if defined $::RD_TRACE;
713 2 $expectation->is(q{thread})->at($text);
714
715 2 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::Thread::thread, 0, 100000000, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::Mail::IMAPClient::Thread::thread, 0, 100000000, $_noactions, $expectation, sub { \@arg; } , undef))) 0 2 2
716 {
717 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [thread]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
718 Parse::RecDescent::_tracefirst($text),
719 q{start},
720 $tracelevel)
721 if defined $::RD_TRACE;
722 0 last;
723 }
724 2 ▶ Parse::RecDescent::_trace(q{>>Matched repeated subrule: [thread]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
725 . @$_tok . q{ times)},
726  
727 Parse::RecDescent::_tracefirst($text),
728 q{start},
729 $tracelevel)
730 if defined $::RD_TRACE;
731 2 $item{q{thread(s?)}} = $_tok;
732 2 push @item, $_tok;
733
734  
735  
736 2 ▶ Parse::RecDescent::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
737 Parse::RecDescent::_tracefirst($text),
738 q{start},
739 $tracelevel)
740 if defined $::RD_TRACE;
741
742  
743 2 ▶ $_tok = ($_noactions) ? 0 : do {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 2 2
744 2 ▶ $return=$item{'thread(s?)'}||undef;
Condition50%1/2
$item{'thread(s?)'} || undef
l!l
20
MC/DC0%0/1
$item{'thread(s?)'} || undef
$item{'thread(s?)'}
Truth table50%1/2
A
A= $item{'thread(s?)'}
Aresult
11
00
745 };
746 2 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 2 2
747 {
748 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
749 if defined $::RD_TRACE;
750 0 last;
751 }
752 2 ▶ Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
753 . $_tok . q{])},
754 Parse::RecDescent::_tracefirst($text))
755 if defined $::RD_TRACE;
756 2 push @item, $_tok;
757 2 $item{__ACTION1__}=$_tok;
758
759  
760 2 ▶ Parse::RecDescent::_trace(q{>>Matched production: [/^\\* THREAD /i thread]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
761 Parse::RecDescent::_tracefirst($text),
762 q{start},
763 $tracelevel)
764 if defined $::RD_TRACE;
765  
766  
767  
768 2 $_matched = 1;
769 2 last;
770 }
771  
772  
773 2 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 2 2
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
200
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
774 {
775
776  
777 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
778 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
779 Parse::RecDescent::_tracefirst($_[1]),
780 q{start},
781 $tracelevel)
782 if defined $::RD_TRACE;
783 0 return undef;
784 }
785 2 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 2 2
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
200
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
786 {
787 0 ▶ Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
788 q{start},
789 $tracelevel)
790 if defined $::RD_TRACE;
791 0 $return = $score_return;
792 }
793 2 splice @{$thisparser->{errors}}, $err_at;
794 2 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 2 2
795 2 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 2 2
796 {
797 0 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
798 $return . q{])}, "",
799 q{start},
800 $tracelevel);
801 0 Parse::RecDescent::_trace(q{(consumed: [} .
802 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
803 Parse::RecDescent::_tracefirst($text),
804 , q{start},
805 $tracelevel)
806 }
807 2 $_[1] = $text;
808 2 return $return;
809 }
810 }
811 1 ▶package Mail::IMAPClient::Thread; sub new { my $self = bless( {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
812 '_AUTOTREE' => undef,
813 '_AUTOACTION' => undef,
814 'namespace' => 'Parse::RecDescent::Mail::IMAPClient::Thread',
815 'startcode' => '',
816 'rules' => {
817 'thread' => bless( {
818 'calls' => [
819 'threadmember'
820 ],
821 'prods' => [
822 bless( {
823 'error' => undef,
824 'actcount' => 1,
825 'uncommit' => undef,
826 'line' => undef,
827 'items' => [
828 bless( {
829 'line' => 10,
830 'pattern' => '(',
831 'lookahead' => 0,
832 'hashname' => '__STRING1__',
833 'description' => '\'(\''
834 }, 'Parse::RecDescent::InterpLit' ),
835 bless( {
836 'lookahead' => 0,
837 'subrule' => 'threadmember',
838 'line' => 10,
839 'max' => 100000000,
840 'min' => 1,
841 'argcode' => undef,
842 'expected' => undef,
843 'matchrule' => 0,
844 'repspec' => 's'
845 }, 'Parse::RecDescent::Repetition' ),
846 bless( {
847 'pattern' => ')',
848 'line' => 10,
849 'lookahead' => 0,
850 'hashname' => '__STRING2__',
851 'description' => '\')\''
852 }, 'Parse::RecDescent::InterpLit' ),
853 bless( {
854 'hashname' => '__ACTION1__',
855 'code' => '{
856 $return = $item{\'threadmember(s)\'}||undef;
857 }',
858 'line' => 11,
859 'lookahead' => 0
860 }, 'Parse::RecDescent::Action' )
861 ],
862 'dircount' => 0,
863 'strcount' => 2,
864 'number' => 0,
865 'patcount' => 0
866 }, 'Parse::RecDescent::Production' )
867 ],
868 'line' => 10,
869 'impcount' => 0,
870 'changed' => 0,
871 'vars' => '',
872 'opcount' => 0,
873 'name' => 'thread'
874 }, 'Parse::RecDescent::Rule' ),
875 'threadmember' => bless( {
876 'line' => 5,
877 'prods' => [
878 bless( {
879 'error' => undef,
880 'strcount' => 0,
881 'dircount' => 0,
882 'items' => [
883 bless( {
884 'matchrule' => 0,
885 'argcode' => undef,
886 'lookahead' => 0,
887 'subrule' => 'NUMBER',
888 'implicit' => undef,
889 'line' => 7
890 }, 'Parse::RecDescent::Subrule' ),
891 bless( {
892 'hashname' => '__ACTION1__',
893 'code' => '{ $return = $item{NUMBER} ; }',
894 'line' => 7,
895 'lookahead' => 0
896 }, 'Parse::RecDescent::Action' )
897 ],
898 'line' => undef,
899 'patcount' => 0,
900 'number' => 0,
901 'actcount' => 1,
902 'uncommit' => undef
903 }, 'Parse::RecDescent::Production' ),
904 bless( {
905 'error' => undef,
906 'actcount' => 1,
907 'uncommit' => undef,
908 'strcount' => 0,
909 'dircount' => 0,
910 'items' => [
911 bless( {
912 'matchrule' => 0,
913 'argcode' => undef,
914 'lookahead' => 0,
915 'line' => 8,
916 'implicit' => undef,
917 'subrule' => 'thread'
918 }, 'Parse::RecDescent::Subrule' ),
919 bless( {
920 'lookahead' => 0,
921 'line' => 8,
922 'hashname' => '__ACTION1__',
923 'code' => '{ $return = $item{thread} ; }'
924 }, 'Parse::RecDescent::Action' )
925 ],
926 'line' => 7,
927 'patcount' => 0,
928 'number' => 1
929 }, 'Parse::RecDescent::Production' )
930 ],
931 'calls' => [
932 'NUMBER',
933 'thread'
934 ],
935 'impcount' => 0,
936 'changed' => 0,
937 'vars' => '',
938 'opcount' => 0,
939 'name' => 'threadmember'
940 }, 'Parse::RecDescent::Rule' ),
941 'NUMBER' => bless( {
942 'line' => 1,
943 'prods' => [
944 bless( {
945 'line' => undef,
946 'items' => [
947 bless( {
948 'ldelim' => '/',
949 'mod' => '',
950 'description' => '/\\\\d+/',
951 'rdelim' => '/',
952 'pattern' => '\\d+',
953 'line' => 3,
954 'lookahead' => 0,
955 'hashname' => '__PATTERN1__'
956 }, 'Parse::RecDescent::Token' )
957 ],
958 'dircount' => 0,
959 'strcount' => 0,
960 'number' => 0,
961 'patcount' => 1,
962 'actcount' => 0,
963 'uncommit' => undef,
964 'error' => undef
965 }, 'Parse::RecDescent::Production' )
966 ],
967 'calls' => [],
968 'opcount' => 0,
969 'name' => 'NUMBER',
970 'impcount' => 0,
971 'changed' => 0,
972 'vars' => ''
973 }, 'Parse::RecDescent::Rule' ),
974 'start' => bless( {
975 'opcount' => 0,
976 'name' => 'start',
977 'impcount' => 0,
978 'changed' => 0,
979 'vars' => '',
980 'calls' => [
981 'thread'
982 ],
983 'prods' => [
984 bless( {
985 'error' => undef,
986 'actcount' => 1,
987 'uncommit' => undef,
988 'strcount' => 0,
989 'line' => undef,
990 'items' => [
991 bless( {
992 'ldelim' => '/',
993 'mod' => 'i',
994 'description' => '/^\\\\* THREAD /i',
995 'rdelim' => '/',
996 'pattern' => '^\\* THREAD ',
997 'line' => 16,
998 'lookahead' => 0,
999 'hashname' => '__PATTERN1__'
1000 }, 'Parse::RecDescent::Token' ),
1001 bless( {
1002 'lookahead' => 0,
1003 'subrule' => 'thread',
1004 'line' => 16,
1005 'max' => 100000000,
1006 'min' => 0,
1007 'argcode' => undef,
1008 'expected' => undef,
1009 'matchrule' => 0,
1010 'repspec' => 's?'
1011 }, 'Parse::RecDescent::Repetition' ),
1012 bless( {
1013 'lookahead' => 0,
1014 'line' => 16,
1015 'code' => '{
1016 $return=$item{\'thread(s?)\'}||undef;
1017 }',
1018 'hashname' => '__ACTION1__'
1019 }, 'Parse::RecDescent::Action' )
1020 ],
1021 'dircount' => 0,
1022 'patcount' => 1,
1023 'number' => 0
1024 }, 'Parse::RecDescent::Production' )
1025 ],
1026 'line' => 15
1027 }, 'Parse::RecDescent::Rule' )
1028 },
1029 '_check' => {
1030 'thisoffset' => '',
1031 'prevcolumn' => '',
1032 'prevline' => '',
1033 'itempos' => '',
1034 'thiscolumn' => '',
1035 'prevoffset' => ''
1036 },
1037 'localvars' => ''
1038 }, 'Parse::RecDescent' );
1039 }
« IMAPClient/BodyStructure/Parse.pm ↑ Summary IMAPClient/BodyStructure.pm »