Branch Coverage

blib/lib/Tie/Handle/CSV.pm
Criterion Covered Total %
branch 49 50 98.0


line true false branch
28 28 9 if ref $_[0]
41 23 5 if (@opts % 2) { }
53 1 27 if (exists $opts{'openmode'} and not exists $opts{'open_mode'})
59 1 27 if (exists $opts{'stringify'} and not exists $opts{'simple_reads'})
66 1 27 if ($file_ref_type eq 'GLOB') { }
75 5 22 if (defined $opts{'open_mode'}) { }
77 1 4 unless open $csv_fh, $opts{'open_mode'}, $opts{'file'}
82 7 15 unless open $csv_fh, $opts{'file'}
89 2 18 if ($opts{'csv_parser'}) { }
2 16 elsif (defined $opts{'sep_char'}) { }
91 1 1 if (ref $opts{'csv_parser'} ne 'Text::CSV_XS')
106 5 14 unless exists $opts{'header'}
108 14 5 if ($opts{'header'})
111 9 5 if (ref $opts{'header'} ne 'ARRAY')
114 0 9 unless $opts{'csv_parser'}->parse($header_line)
122 4 10 if ($opts{'force_lower'} and not $opts{'key_case'})
127 9 5 if ($opts{'key_case'})
130 6 3 if (lc $opts{'key_case'} eq 'lower') { }
1 2 elsif (lc $opts{'key_case'} eq 'upper') { }
159 1 63 if (wantarray) { }
175 44 19 if (defined $cols)
177 33 11 if ($$opts{'header'}) { }
181 11 22 if ($$opts{'simple_reads'}) { }
197 3 8 if ($$opts{'simple_reads'}) { }
249 1 4 if (not $header or ref $header ne 'ARRAY')