blib/lib/Mail/Mbox/MessageParser/Perl.pm

filter: Statementstmt 96.2% 155 / 161 Branchbran 83.9% 47 / 56 Conditioncond 83.3% 10 / 12 MC/DCmcdc 62.5% 5 / 8 Subroutinesub 100% 18 / 18 Podpod 100% 4 / 4 totaltotal 92.2% 239 / 259 CC 33 SCAR 16.2
CC
33
Cov
93%
_read_rest_of_email
10.0
_read_chunk
6.8
_read_until_match
6.0
CRAP 5.1
« blib/lib/Mail/Mbox/MessageParser/Cache.pm ↑ Summary /tmp/LEXZek8_fJ »
1 package Mail::Mbox::MessageParser::Perl;
2  
3 52 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 52 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 52 ▶use Mail::Mbox::MessageParser;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 52 ▶use Mail::Mbox::MessageParser::Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 52 ▶use vars qw( $VERSION $_DEBUG @ISA );
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 52 @ISA = qw( Exporter Mail::Mbox::MessageParser );
12  
13 52 $VERSION = sprintf "%d.%02d%02d", q/1.60.5/ =~ /(\d+)/g;
14  
15 52 *_DEBUG = \$Mail::Mbox::MessageParser::_DEBUG;
16 52 *_dprint = \&Mail::Mbox::MessageParser::_dprint;
17 sub _dprint;
18  
19 #-------------------------------------------------------------------------------
20  
21 sub new
22 {
23 435 ▶ my ($proto, $self) = @_;
Subroutine new: called CC=2 SCAR=7.0
Pod documented
24  
25 435 ▶ carp "Need file_handle option" unless defined $self->{'file_handle'};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $self->{"file_handle"} 0 435 435
26  
27 435 bless ($self, __PACKAGE__);
28  
29 435 $self->_init();
30  
31 435 return $self;
32 }
33  
34 #-------------------------------------------------------------------------------
35  
36 sub _init
37 {
38 435 ▶ my $self = shift;
Subroutine _init: called CC=1 SCAR=0.0
39  
40 435 $self->{'CURRENT_LINE_NUMBER'} = 1;
41 435 $self->{'CURRENT_OFFSET'} = 0;
42  
43 435 $self->{'READ_BUFFER'} = '';
44 435 $self->{'START_OF_EMAIL'} = 0;
45 435 $self->{'END_OF_EMAIL'} = 0;
46  
47 $self->{'READ_CHUNK_SIZE'} =
48 435 $Mail::Mbox::MessageParser::Config{'read_chunk_size'};
49  
50 435 $self->SUPER::_init();
51 }
52  
53 #-------------------------------------------------------------------------------
54  
55 sub reset
56 {
57 44 ▶ my $self = shift;
Subroutine reset: called CC=1 SCAR=0.0
Pod documented
58  
59 44 $self->{'CURRENT_LINE_NUMBER'} = ($self->{'prologue'} =~ tr/\n//) + 1;
60 44 $self->{'CURRENT_OFFSET'} = length($self->{'prologue'});
61  
62 44 $self->{'READ_BUFFER'} = '';
63 44 $self->{'START_OF_EMAIL'} = 0;
64 44 $self->{'END_OF_EMAIL'} = 0;
65  
66 44 $self->SUPER::reset();
67 }
68  
69 #-------------------------------------------------------------------------------
70  
71 sub end_of_file
72 {
73 6567 ▶ my $self = shift;
Subroutine end_of_file: called CC=3 SCAR=11.0
Pod documented
74  
75 # Reset eof in case the file was appended to. Hopefully this works all the
76 # time. See perldoc -f seek for details.
77 6567 ▶ seek($self->{'file_handle'},0,1) if eof $self->{'file_handle'};
Branch: 1 branch
BranchTrueFalseTotal
if eof $self->{"file_handle"} 2965 3602 6567
78  
79 return eof $self->{'file_handle'} &&
80 6567 ▶ $self->{'END_OF_EMAIL'} == length($self->{'READ_BUFFER'});
Condition100%3/3
eof $self->{'file_handle'} && $self->{'END_OF_EMAIL'} == length $self->{'READ_BUFFER'}
!ll&&!rl&&r
36042241722
MC/DC100%2/2
eof $self->{'file_handle'} && $self->{'END_OF_EMAIL'} == length $self->{'READ_BUFFER'}
eof $self->{'file_handle'} $self->{'END_OF_EMAIL'} == length $self->{'READ_BUFFER'}
Truth table100%3/3
A && B
A= eof $self->{'file_handle'}B= $self->{'END_OF_EMAIL'} == length $self->{'READ_BUFFER'}
ABresult
0X0
100
111
81 }
82  
83 #-------------------------------------------------------------------------------
84  
85 sub _read_prologue
86 {
87 435 ▶ my $self = shift;
Subroutine _read_prologue: called CC=1 SCAR=0.0
88  
89 435 _dprint "Reading mailbox prologue using Perl";
90  
91 435 $self->_read_until_match(
92 qr/$Mail::Mbox::MessageParser::Config{'from_pattern'}/m,0);
93  
94 435 my $start_of_email = pos($self->{'READ_BUFFER'});
95 435 $self->{'prologue'} = substr($self->{'READ_BUFFER'}, 0, $start_of_email);
96  
97 # Set up for read_next_email
98 435 $self->{'CURRENT_LINE_NUMBER'} += ($self->{'prologue'} =~ tr/\n//);
99 435 $self->{'CURRENT_OFFSET'} = $start_of_email;
100 435 $self->{'END_OF_EMAIL'} = $start_of_email;
101 }
102  
103 #-------------------------------------------------------------------------------
104  
105 sub read_next_email
106 {
107 2444 ▶ my $self = shift;
Subroutine read_next_email: called CC=5 SCAR=16.1
Pod documented
108  
109 2444 ▶ return undef if $self->end_of_file(); ## no critic (ProhibitExplicitReturnUndef)
Branch: 1 branch
BranchTrueFalseTotal
if $self->end_of_file 24 2420 2444
110  
111 2420 $self->{'email_line_number'} = $self->{'CURRENT_LINE_NUMBER'};
112 2420 $self->{'email_offset'} = $self->{'CURRENT_OFFSET'};
113  
114 2420 $self->{'START_OF_EMAIL'} = $self->{'END_OF_EMAIL'};
115  
116 # Slurp in an entire multipart email (but continue looking for the next
117 # header so that we can get any following newlines as well)
118 2420 ▶ unless ($self->_read_header())
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->_read_header) 0 2420 2420
119 {
120 0 return $self->_extract_email_and_finalize();
121 }
122  
123 2420 ▶ unless ($self->_read_email_parts())
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->_read_email_parts) 62 2358 2420
124 {
125 # Could issue a warning here, but I'm not sure how to do this cleanly for
126 # a work-only module like this. Maybe something like CGI's cgi_error()?
127 62 _dprint "Inconsistent multi-part message. Could not find ending for " .
128 "boundary \"" . $self->_multipart_boundary() . "\"";
129  
130 # Try to read the content length and use that
131 my $email_header = substr($self->{'READ_BUFFER'}, $self->{'START_OF_EMAIL'},
132 62 $self->{'START_OF_BODY'} - $self->{'START_OF_EMAIL'});
133  
134 my $content_length = Mail::Mbox::MessageParser::_GET_HEADER_FIELD(
135 62 \$email_header, 'Content-Length:', $self->{'endline'});
136  
137 62 ▶ if (defined $content_length)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $content_length) { } 31 31 62
138 {
139 31 $content_length =~ s/Content-Length: *(\d+).*/$1/i;
140 31 pos($self->{'READ_BUFFER'}) = $self->{'START_OF_EMAIL'} + $content_length;
141 }
142 # Otherwise use the start of the body
143 else
144 {
145 31 pos($self->{'READ_BUFFER'}) = $self->{'START_OF_BODY'};
146 }
147  
148 # Reset the search and look for the start of the
149 # next email.
150 62 $self->_read_rest_of_email();
151  
152 62 return $self->_extract_email_and_finalize();
153 }
154  
155 2358 $self->_read_rest_of_email();
156  
157 2358 return $self->_extract_email_and_finalize();
158 }
159  
160 #-------------------------------------------------------------------------------
161  
162 sub _read_rest_of_email
163 {
164 2420 ▶ my $self = shift;
Subroutine _read_rest_of_email: called CC=10 SCAR=23.0
165  
166 2420 my $previous_backup;
167  
168 # Look for the start of the next email
169 2420 while (1)
170 {
171 2577 ▶ while ($self->{'READ_BUFFER'} =~
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"READ_BUFFER"} =~ /$Mail::Mbox::MessageParser::Config{"from_pattern"}/gm) 3870 616 4486
172 m/$Mail::Mbox::MessageParser::Config{'from_pattern'}/mg)
173 {
174 3870 $self->{'END_OF_EMAIL'} = pos($self->{'READ_BUFFER'}) - length($1);
175  
176 3870 my $endline = $self->{'endline'};
177  
178 # Keep looking if the header we found is part of a "Begin Included
179 # Message".
180 3870 my $end_of_string = '';
181 3870 my $backup_amount = 100;
182 do
183 {
184 5605 $backup_amount *= 2;
185 $backup_amount = $self->{'END_OF_EMAIL'} - $self->{'START_OF_EMAIL'}
186 if $backup_amount >
187 5605 ▶ $self->{'END_OF_EMAIL'} - $self->{'START_OF_EMAIL'};
Branch: 1 branch
BranchTrueFalseTotal
if $backup_amount > $self->{"END_OF_EMAIL"} - $self->{"START_OF_EMAIL"} 0 5605 5605
188  
189 $end_of_string = substr($self->{'READ_BUFFER'},
190 5605 $self->{'END_OF_EMAIL'}-$backup_amount, $backup_amount);
191 } while (index($end_of_string, "$endline$endline") == -1 &&
192 3870 ▶ $backup_amount < $self->{'END_OF_EMAIL'} - $self->{'START_OF_EMAIL'});
Branch: 1 branch
BranchTrueFalseTotal
index($end_of_string, "$endline$endline") == -1 and $backup_amount < $self->{"END_OF_EMAIL"} - $self->{"START_OF_EMAIL"} and do { do { $backup_amount *= 2; $backup_amount = $self->{"END_OF_EMAIL"} - $self->{"START_OF_EMAIL"} if $backup_amount > $self->{"END_OF_EMAIL"} - $self->{"START_OF_EMAIL"}; $end_of_string = substr($self->{"READ_BUFFER"}, $self->{"END_OF_EMAIL"} - $backup_amount, $backup_amount) } } 1735 3870 5605
Condition66%2/3
index($end_of_string, "$endline$endline") == -1 and $backup_amount < $self->{"END_OF_EMAIL"} - $self->{"START_OF_EMAIL"}
!ll&&!rl&&r
387001735
MC/DC50%1/2
index($end_of_string, "$endline$endline") == -1 and $backup_amount < $self->{"END_OF_EMAIL"} - $self->{"START_OF_EMAIL"}
index($end_of_string, "$endline$endline") == -1 $backup_amount < $self->{"END_OF_EMAIL"} - $self->{"START_OF_EMAIL"}
Truth table66%2/3
A and B
A= index($end_of_string, "$endline$endline") == -1B= $backup_amount < $self->{"END_OF_EMAIL"} - $self->{"START_OF_EMAIL"}
ABresult
0X0
100
111
193  
194 3870 ▶ next if $end_of_string =~
Branch: 1 branch
BranchTrueFalseTotal
if $end_of_string =~ /$endline-----(?: Begin Included Message |Original Message)-----${endline}[^\r\n]*(?:$endline)*$/i 105 3765 3870
195 /$endline-----(?: Begin Included Message |Original Message)-----$endline[^\r\n]*(?:$endline)*$/i;
196  
197 3765 ▶ next unless $end_of_string =~ /$endline$endline$/;
Branch: 1 branch
BranchTrueFalseTotal
unless $end_of_string =~ /$endline$endline$/ 1804 1961 3765
198  
199 # Found the next email!
200 1961 return;
201 }
202  
203 # Didn't find next email in current buffer. Most likely we need to read some
204 # more of the mailbox. Shift the current email to the front of the buffer
205 # unless we've already done so.
206 616 my $shift_amount = $self->{'START_OF_EMAIL'};
207 $self->{'READ_BUFFER'} =
208 616 substr($self->{'READ_BUFFER'}, $self->{'START_OF_EMAIL'});
209 616 $self->{'START_OF_EMAIL'} -= $shift_amount;
210 616 $self->{'START_OF_BODY'} -= $shift_amount;
211 616 pos($self->{'READ_BUFFER'}) = length($self->{'READ_BUFFER'});
212  
213 # Start looking at the end of the buffer, but back up some in case the
214 # edge of the newly read buffer contains the start of a new header. I
215 # believe the RFC says header lines can be at most 90 characters long.
216 616 my $backup_amount = 90;
217 $backup_amount = length($self->{'READ_BUFFER'}) - 1
218 616 ▶ if length($self->{'READ_BUFFER'}) < $backup_amount;
Branch: 1 branch
BranchTrueFalseTotal
if length $self->{"READ_BUFFER"} < $backup_amount 0 616 616
219  
220 # Avoid an infinite loop that can occur if the pattern is within the
221 # 90-character lookback, but doesn't indicate the start of the next email.
222 # We detect this case as one where we previously shifted the email to
223 # the start of the buffer.
224 616 ▶ if ($shift_amount == 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($shift_amount == 0) { } 242 374 616
225 242 $previous_backup--;
226 242 $backup_amount = $previous_backup;
227 } else {
228 374 $previous_backup = $backup_amount;
229 }
230  
231 616 ▶ unless ($self->_read_until_match(
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->_read_until_match(qr/$Mail::Mbox::MessageParser::Config{"from_pattern"}/m, $backup_amount)) 459 157 616
232 qr/$Mail::Mbox::MessageParser::Config{'from_pattern'}/m,$backup_amount))
233 {
234 459 $self->{'END_OF_EMAIL'} = length($self->{'READ_BUFFER'});
235 459 return;
236 }
237  
238 157 redo;
239 }
240 }
241  
242 #-------------------------------------------------------------------------------
243  
244 sub _multipart_boundary
245 {
246 2482 ▶ my $self = shift;
Subroutine _multipart_boundary: called CC=4 SCAR=14.0
247  
248 2482 my $endline = $self->{'endline'};
249  
250 2482 ▶ if (substr($self->{'READ_BUFFER'},$self->{'START_OF_EMAIL'},
Branch: 1 branch
BranchTrueFalseTotal
if (substr($self->{"READ_BUFFER"}, $self->{"START_OF_EMAIL"}, $self->{"START_OF_BODY"} - $self->{"START_OF_EMAIL"}) =~ /^(content-type: *multipart[^\n\r]*$endline( [^\n\r]*$endline)*)/im) 696 1786 2482
251 $self->{'START_OF_BODY'}-$self->{'START_OF_EMAIL'}) =~
252 /^(content-type: *multipart[^\n\r]*$endline( [^\n\r]*$endline)*)/im)
253 {
254 696 my $content_type_header = $1;
255 696 $content_type_header =~ s/$endline//g;
256  
257 696 ▶ if ($content_type_header =~ /boundary *= *"([^"]*)"/i ||
Branch: 1 branch
BranchTrueFalseTotal
if ($content_type_header =~ /boundary *= *"([^"]*)"/i or $content_type_header =~ m[boundary *= *([-0-9A-Za-z'()+_,./:=? ]*[-0-9A-Za-z'()+_,./:=?])]i) 696 0 696
Condition66%2/3
$content_type_header =~ /boundary *= *"([^"]*)"/i or $content_type_header =~ m[boundary *= *([-0-9A-Za-z'()+_,./:=? ]*[-0-9A-Za-z'()+_,./:=?])]i
l!l&&r!l&&!r
4622340
MC/DC0%0/2
$content_type_header =~ /boundary *= *"([^"]*)"/i or $content_type_header =~ m[boundary *= *([-0-9A-Za-z'()+_,./:=? ]*[-0-9A-Za-z'()+_,./:=?])]i
$content_type_header =~ /boundary *= *"([^"]*)"/i $content_type_header =~ m[boundary *= *([-0-9A-Za-z'()+_,./:=? ]*[-0-9A-Za-z'()+_,./:=?])]i
Truth table66%2/3
A or B
A= $content_type_header =~ /boundary *= *"([^"]*)"/iB= $content_type_header =~ m[boundary *= *([-0-9A-Za-z'()+_,./:=? ]*[-0-9A-Za-z'()+_,./:=?])]i
ABresult
1X1
011
000
258 $content_type_header =~ /boundary *= *([-0-9A-Za-z'()+_,.\/:=? ]*[-0-9A-Za-z'()+_,.\/:=?])/i)
259 {
260 696 return $1
261 }
262 }
263  
264 1786 return undef; ## no critic (ProhibitExplicitReturnUndef)
265 }
266  
267 #-------------------------------------------------------------------------------
268  
269 sub _read_email_parts
270 {
271 2420 ▶ my $self = shift;
Subroutine _read_email_parts: called CC=3 SCAR=11.0
272  
273 2420 my $boundary = $self->_multipart_boundary();
274  
275 2420 ▶ return 1 unless defined $boundary;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $boundary 1786 634 2420
276  
277 # RFC 1521 says the boundary can be no longer than 70 characters. Back up a
278 # little more than that. Unlike _read_rest_of_email() we don't have to
279 # worry about infinite loops here since the pattern is designed to not
280 # match falsely.
281 634 my $endline = $self->{'endline'};
282 634 ▶ $self->_read_until_match(qr/^--\Q$boundary\E--$endline/m,76)
Branch: 1 branch
BranchTrueFalseTotal
$self->_read_until_match(qr/^--\Q$boundary\E--$endline/m, 76) or return 0 62 572 634
283 or return 0;
284  
285 572 return 1;
286 }
287  
288 #-------------------------------------------------------------------------------
289  
290 sub _extract_email_and_finalize
291 {
292 2420 ▶ my $self = shift;
Subroutine _extract_email_and_finalize: called CC=1 SCAR=0.0
293  
294 2420 $self->{'email_length'} = $self->{'END_OF_EMAIL'}-$self->{'START_OF_EMAIL'};
295  
296 my $email = substr($self->{'READ_BUFFER'}, $self->{'START_OF_EMAIL'},
297 2420 $self->{'email_length'});
298  
299 2420 $self->{'CURRENT_LINE_NUMBER'} += ($email =~ tr/\n//);
300 2420 $self->{'CURRENT_OFFSET'} += $self->{'email_length'};
301  
302 2420 $self->{'email_number'}++;
303  
304 2420 $self->SUPER::read_next_email();
305  
306 2420 return \$email;
307 }
308  
309 #-------------------------------------------------------------------------------
310  
311 sub _read_header
312 {
313 2420 ▶ my $self = shift;
Subroutine _read_header: called CC=2 SCAR=7.0
314  
315 2420 ▶ $self->_read_until_match(qr/$self->{'endline'}$self->{'endline'}/m,0)
Branch: 1 branch
BranchTrueFalseTotal
$self->_read_until_match(qr/$self->{"endline"}$self->{"endline"}/m, 0) or return 0 0 2420 2420
316 or return 0;
317  
318 $self->{'START_OF_BODY'} =
319 2420 pos($self->{'READ_BUFFER'}) + length("$self->{'endline'}$self->{'endline'}");
320  
321 2420 return 1;
322 }
323  
324 #-------------------------------------------------------------------------------
325  
326 # The search position is at the start of the pattern when this function
327 # returns 1.
328 sub _read_until_match
329 {
330 4105 ▶ my $self = shift;
Subroutine _read_until_match: called CC=6 SCAR=17.9
331 4105 my $pattern = shift;
332 4105 my $backup = shift;
333  
334 # Start looking at the end of the buffer, but back up some in case the edge
335 # of the newly read buffer contains part of the pattern.
336 4105 ▶ if (!defined pos($self->{'READ_BUFFER'}) ||
Branch: 1 branch
BranchTrueFalseTotal
if (not defined pos $self->{'READ_BUFFER'} or pos($self->{'READ_BUFFER'}) - $backup <= 0) { } 879 3226 4105
Condition100%3/3
not defined pos $self->{"READ_BUFFER"} or pos($self->{"READ_BUFFER"}) - $backup <= 0
l!l&&r!l&&!r
4794003226
MC/DC100%2/2
not defined pos $self->{"READ_BUFFER"} or pos($self->{"READ_BUFFER"}) - $backup <= 0
not defined pos $self->{"READ_BUFFER"} pos($self->{"READ_BUFFER"}) - $backup <= 0
Truth table100%3/3
not(A) or B
A= not defined pos $self->{"READ_BUFFER"}B= pos($self->{"READ_BUFFER"}) - $backup <= 0
ABresult
1X1
011
000
337 pos($self->{'READ_BUFFER'}) - $backup <= 0) {
338 879 pos($self->{'READ_BUFFER'}) = 0;
339 } else {
340 3226 pos($self->{'READ_BUFFER'}) -= $backup;
341 }
342  
343 4105 while (1)
344 {
345 5009 ▶ if ($self->{'READ_BUFFER'} =~ m/($pattern)/mg)
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"READ_BUFFER"} =~ /($pattern)/gm) 3584 1425 5009
346 {
347 3584 pos($self->{'READ_BUFFER'}) -= length($1);
348 3584 return 1;
349 }
350  
351 1425 pos($self->{'READ_BUFFER'}) = length($self->{'READ_BUFFER'});
352  
353 1425 ▶ unless ($self->_read_chunk()) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->_read_chunk) 521 904 1425
354 521 $self->{'END_OF_EMAIL'} = length($self->{'READ_BUFFER'});
355 521 return 0;
356 }
357  
358 904 ▶ if (pos($self->{'READ_BUFFER'}) - $backup <= 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (pos($self->{'READ_BUFFER'}) - $backup <= 0) { } 479 425 904
359 479 pos($self->{'READ_BUFFER'}) = 0;
360 } else {
361 425 pos($self->{'READ_BUFFER'}) -= $backup;
362 }
363 }
364 }
365  
366 #-------------------------------------------------------------------------------
367  
368 # Maintains pos($self->{'READ_BUFFER'})
369 sub _read_chunk
370 {
371 1425 ▶ my $self = shift;
Subroutine _read_chunk: called CC=6 SCAR=19.2
372  
373 1425 my $search_position = pos($self->{'READ_BUFFER'});
374  
375 # Can't use sysread because it doesn't work with ungetc
376 1425 ▶ if ($self->{'READ_CHUNK_SIZE'} == 0)
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'READ_CHUNK_SIZE'} == 0) { } 0 1425 1425
377 {
378 0 local $/ = undef;
379  
380 0 ▶ return 0 if eof $self->{'file_handle'};
Branch: 1 branch
BranchTrueFalseTotal
if eof $self->{"file_handle"} 0 0 0
381  
382 # < $self->{'file_handle'} > doesn't work, so we use readline
383 0 $self->{'READ_BUFFER'} = readline($self->{'file_handle'});
384 0 pos($self->{'READ_BUFFER'}) = $search_position;
385 0 return 1;
386 }
387 else
388 {
389 1425 my $total_amount_read = 0;
390 1425 my $amount_read = 0;
391  
392 1425 ▶ while ($total_amount_read < $self->{'READ_CHUNK_SIZE'})
Branch: 1 branch
BranchTrueFalseTotal
if ($total_amount_read < $self->{"READ_CHUNK_SIZE"}) 1890 439 2329
393 {
394 $amount_read = read($self->{'file_handle'}, $self->{'READ_BUFFER'},
395 $self->{'READ_CHUNK_SIZE'} - $total_amount_read,
396 1890 length($self->{'READ_BUFFER'}));
397  
398 1890 pos($self->{'READ_BUFFER'}) = $search_position;
399  
400 1890 ▶ if ($amount_read == 0)
Branch: 1 branch
BranchTrueFalseTotal
if ($amount_read == 0) 986 904 1890
401 {
402 986 ▶ return 1 unless $total_amount_read == 0;
Branch: 1 branch
BranchTrueFalseTotal
unless $total_amount_read == 0 465 521 986
403  
404 521 return 0;
405 }
406  
407 904 $total_amount_read += $amount_read;
408 }
409  
410 439 return 1;
411 }
412 }
413  
414 #-------------------------------------------------------------------------------
415  
416 52 1;
417  
418 __END__
« blib/lib/Mail/Mbox/MessageParser/Cache.pm ↑ Summary /tmp/LEXZek8_fJ »