line |
true |
false |
branch |
14
|
0 |
3 |
$PDL::IO::CSV::Config{'ivsize'} < 8 ? : |
15
|
0 |
3 |
eval {
do {
require PDL::DateTime;
require Time::Moment;
1
}
} ? : |
16
|
0 |
3 |
$ENV{'PDL_IO_CSV_DEBUG'} ? : |
31
|
2 |
1 |
if grep {/^(:all|wcsv2D)$/;} @_ |
32
|
2 |
1 |
if grep {/^(:all|wcsv1D)$/;} @_ |
34
|
2 |
1 |
if @_ |
66
|
0 |
0 |
unless $c_pdl[$cols]->ndims == 1 |
73
|
0 |
0 |
if $c_pack[$cols] eq 'q' and 0 |
75
|
0 |
0 |
if $rows < $dim |
76
|
0 |
0 |
if ($bad2empty and $c_pdl[$cols]->check_badflag) |
84
|
0 |
0 |
unless my $csv = 'Text::CSV_XS'->new($C) |
85
|
0 |
0 |
if ($O->{'header'}) |
87
|
0 |
0 |
if $cols != $count |
93
|
0 |
0 |
if ($c_max_offset[$c] >= $c_offset[$c]) |
94
|
0 |
0 |
if ($bad2empty and $c_bad[$c]) { } |
96
|
0 |
0 |
if ($v ne $c_bad[$c]) |
98
|
0 |
0 |
if ref $c_pdl[$c] eq 'PDL::DateTime' |
104
|
0 |
0 |
if ref $c_pdl[$c] eq 'PDL::DateTime' |
118
|
0 |
0 |
unless $pdl->ndims == 2 |
126
|
0 |
0 |
if $pck{$type} eq 'q' and 0 |
132
|
0 |
0 |
if ($O->{'bad2empty'} and $p->check_badflag) |
138
|
0 |
0 |
unless my $csv = 'Text::CSV_XS'->new($C) |
139
|
0 |
0 |
if ($O->{'header'}) |
141
|
0 |
0 |
if $cols != $n |
145
|
0 |
0 |
if (defined $bad) { } |
146
|
0 |
0 |
$v eq $bad ? : |
163
|
0 |
6 |
unless my $csv = 'Text::CSV_XS'->new($C) |
171
|
0 |
6 |
if $O->{'debug'} |
175
|
1 |
5 |
if (&looks_like_number($O->{'header'})) { } |
|
5 |
0 |
elsif ($O->{'header'} and $O->{'header'} eq 'auto') { } |
176
|
0 |
1 |
if ($O->{'header'} == 1) { } |
194
|
104 |
6 |
if (defined $r) { } |
195
|
5 |
99 |
if (defined $headerdetection) |
198
|
27 |
0 |
if (&looks_like_number($_)) { } |
206
|
0 |
5 |
if ($numeric == 0) |
213
|
6 |
98 |
unless (defined $c_type) |
215
|
0 |
6 |
if $O->{'debug'} |
217
|
0 |
104 |
if ($dec_comma) |
218
|
0 |
0 |
if defined $_ |
220
|
72 |
32 |
if ($empty2bad) |
221
|
0 |
72 |
if (defined $coli) { } |
224
|
0 |
0 |
unless (defined $r->[$i]) |
229
|
0 |
360 |
unless (defined $r->[$_]) |
233
|
0 |
104 |
if (defined $c_dt) |
235
|
0 |
0 |
unless defined $c_dt->[$_] |
236
|
0 |
0 |
$c_dt->[$_] ne 'datetime' ? : |
237
|
0 |
0 |
if (defined $v) { } |
246
|
0 |
104 |
if ($text2bad) |
247
|
0 |
0 |
if (defined $coli) { } |
250
|
0 |
0 |
unless (&looks_like_number($r->[$i])) |
255
|
0 |
0 |
unless (&looks_like_number($r->[$_])) |
259
|
0 |
104 |
if (defined $coli) { } |
278
|
6 |
0 |
if ($rows > 0) |
280
|
0 |
6 |
if ($allocated < $processed) |
282
|
0 |
0 |
if $O->{'debug'} |
291
|
0 |
30 |
if $len != $expected_len |
299
|
6 |
0 |
if (ref $c_pdl eq 'ARRAY') |
300
|
6 |
0 |
if ($processed != $allocated) |
301
|
0 |
6 |
if $O->{'debug'} |
305
|
0 |
6 |
if (ref $headerline eq 'ARRAY') |
307
|
0 |
0 |
if $headerline->[$_] and $headerline->[$_] ne '' |
322
|
0 |
7 |
unless my $csv = 'Text::CSV_XS'->new($C) |
333
|
0 |
7 |
if $O->{'debug'} |
334
|
1 |
6 |
if ($O->{'header'}) |
342
|
52 |
7 |
if (defined $r) { } |
343
|
7 |
45 |
unless (defined $pck) |
345
|
0 |
7 |
if $O->{'debug'} |
348
|
0 |
52 |
if ($dec_comma) |
349
|
0 |
0 |
if defined $_ |
351
|
10 |
42 |
if ($empty2bad) |
352
|
0 |
10 |
if (defined $coli) { } |
355
|
0 |
0 |
unless (defined $r->[$i]) |
360
|
6 |
24 |
unless (defined $r->[$_]) |
364
|
5 |
47 |
if ($text2bad) |
365
|
0 |
5 |
if (defined $coli) { } |
368
|
0 |
0 |
unless (&looks_like_number($r->[$i])) |
373
|
1 |
14 |
unless (&looks_like_number($r->[$_])) |
377
|
0 |
52 |
if (defined $coli) { } |
396
|
7 |
0 |
if ($rows > 0) |
398
|
0 |
7 |
if ($allocated < $processed) |
400
|
0 |
0 |
if $O->{'debug'} |
406
|
0 |
7 |
if $len != $expected_len |
414
|
7 |
0 |
if (&blessed($c_pdl) and $c_pdl->isa('PDL')) |
415
|
7 |
0 |
if ($processed != $allocated) |
416
|
0 |
7 |
if $O->{'debug'} |
438
|
0 |
0 |
ref $_[-1] eq 'HASH' ? : |
439
|
0 |
0 |
!(&blessed($_[-1]) && $_[-1]->isa('PDL')) ? : |
446
|
0 |
0 |
unless defined $O->{'debug'} |
447
|
0 |
0 |
unless defined $O->{'bad2empty'} |
448
|
0 |
0 |
$fn eq '1D' ? : |
|
0 |
0 |
unless defined $O->{'header'} |
451
|
0 |
0 |
unless defined $C->{'sep_char'} |
452
|
0 |
0 |
unless defined $C->{'eol'} |
454
|
0 |
0 |
if (defined $O->{'header'}) |
455
|
0 |
0 |
unless ref $O->{'header'} eq 'ARRAY' or $O->{'header'} eq 'auto' |
456
|
0 |
0 |
if ($O->{'header'} eq 'auto') |
461
|
0 |
0 |
if defined $n |
463
|
0 |
0 |
$count > 0 ? : |
468
|
0 |
0 |
if (not defined $filename_or_fh) { } |
|
0 |
0 |
elsif (&openhandle($filename_or_fh)) { } |
475
|
0 |
0 |
unless open $fh, '>', $filename_or_fh |
477
|
0 |
0 |
if $O->{'encoding'} |
483
|
8 |
5 |
ref $_[-1] eq 'HASH' ? : |
486
|
0 |
13 |
if defined $coli and ref $coli ne 'ARRAY' |
487
|
0 |
13 |
unless defined $filename_or_fh |
495
|
3 |
4 |
$fn eq '1D' ? : |
496
|
5 |
6 |
$fn eq '1D' ? : |
504
|
13 |
0 |
unless defined $O->{'debug'} |
507
|
0 |
13 |
if $O->{'reshape_inc'} < $O->{'fetch_chunk'} |
510
|
13 |
0 |
unless defined $C->{'sep_char'} |
513
|
5 |
8 |
if ($O->{'empty2bad'}) |
518
|
0 |
13 |
if $O->{'decimal_comma'} and $C->{'sep_char'} eq ',' |
521
|
0 |
13 |
if (&openhandle($filename_or_fh)) { } |
525
|
0 |
13 |
unless open $fh, '<', $filename_or_fh |
527
|
0 |
13 |
if $O->{'encoding'} |
536
|
6 |
0 |
if (not defined $coli) { } |
543
|
0 |
6 |
unless $cols and $cols > 0 and $cols <= $colcount |
553
|
1 |
5 |
if (ref $O->{'type'} eq 'ARRAY') { } |
562
|
16 |
14 |
if (not defined $c_type[$_] or $c_type[$_] eq 'auto') { } |
|
0 |
14 |
elsif ($c_type[$_] eq 'datetime') { } |
|
0 |
14 |
elsif ($c_type[$_] =~ /%/) { } |
564
|
0 |
16 |
if ($O->{'detect_datetime'}) |
566
|
0 |
0 |
$O->{'strptime'} ? : |
567
|
0 |
0 |
if (defined $v) |
568
|
0 |
0 |
$O->{'strptime'} ? : |
582
|
16 |
14 |
unless $c_type[$_] |
587
|
0 |
30 |
unless defined $c_type[$_] |
589
|
0 |
30 |
if $c_pack[$_] eq 'q' and 0 |
590
|
0 |
30 |
unless $c_pack[$_] |
592
|
0 |
30 |
$c_dt[$_] ? : |
597
|
0 |
30 |
if $big != $c_sizeof[$_] |
600
|
0 |
6 |
@c_dt > 0 ? : |
607
|
7 |
0 |
if (not defined $coli) { } |
614
|
0 |
7 |
unless $cols and $cols > 0 and $cols <= $colcount |
618
|
0 |
7 |
if $c_pack eq 'q' and 0 |
619
|
0 |
7 |
unless $c_pack |
628
|
0 |
7 |
if $big != $c_sizeof |