Branch Coverage

blib/lib/PFT/Header.pm
Criterion Covered Total %
branch 42 62 67.7


line true false branch
94 174 43 if (exists $params->{'date'} and defined(my $d = $params->{'date'})) { }
95 1 173 unless $d->isa('PFT::Date')
98 162 11 if ($d->complete) { }
1 10 elsif (not defined $d->y && defined $d->m) { }
100 1 161 unless $params->{'title'}
106 0 43 unless $params->{'title'}
130 206 206 if (defined(my $cb = $OPTS_RECIPE{$_}[1]))
150 58 4 defined $given ? :
159 84 70 if (my $type = ref $from) { }
161 0 84 unless ($type eq 'GLOB' or $type eq 'IO::File')
166 0 70 unless $from = 'IO::File'->new($from)
168 0 154 unless binmode $from, ':encoding(locale)'
175 152 1249 if $_ =~ /^---$/u
180 2 152 unless $hdr
183 125 27 if $hdr->{'Date'}
186 0 152 if $@
194 152 0 defined $given ? :
199 0 123 defined $tags ? :
29 123 ref $tags eq 'ARRAY' ? :
213 0 304 unless exists $OPTS_RECIPE{$_}
237 0 223 unless $out
290 0 74 wantarray ? :
306 0 54 unless +(shift())->{'opts'}
316 0 0 unless $self->{'slug'} or $self->{'title'} and slugify($self->{'title'})
326 0 19 unless (shift())->tags
345 0 0 unless $date->isa('PFT::Date')
360 0 54 if ($type ne 'GLOB' and $type ne 'IO::File')
361 0 0 $type ? :
365 0 54 unless binmode $to, ':encoding(locale)'
366 8 46 @$tags ? :
42 12 $self->date ? :