Branch Coverage

blib/lib/PFT/Content.pm
Criterion Covered Total %
branch 45 68 66.1


line true false branch
77 2 3 if $opts->{'create'}
138 47 0 unless $p->exists
152 0 50 unless $hdr->isa('PFT::Header')
161 38 5 $d->complete ? :
43 7 defined $d ? :
182 0 51 unless $hdr->isa('PFT::Header')
184 44 7 if (defined(my $d = $hdr->date)) { }
187 0 44 unless defined $d->y and defined $d->m
191 39 5 if (defined $d->d) { }
217 1 0 unless $p->exists
232 0 4 unless $hdr->isa('PFT::Header')
245 0 17 unless my $hdr = eval { do { 'PFT::Header'->load($path) } }
315 0 4 unless @_
398 0 26 unless $h
400 26 0 $h ? :
411 0 628 if index($rel, 'File::Spec'->updir) >= 0
418 628 0 defined $dt ? :
419 0 0 unless $ym =~ /^\d{4}-\d{2}.month$/u
449 0 25 if $back < 0
466 26 302 if ($seen_dates == $back)
467 0 26 unless my $hdr = eval { do { 'PFT::Header'->load($path) } }
476 25 303 if $seen_dates > $back
497 0 3 unless defined $date and $date->isa('PFT::Date')
499 1 2 defined $date->y ? :
500 1 2 defined $date->m ? :
501 1 2 defined $date->d ? :
522 0 3 unless ($content->isa('PFT::Content::File'))
527 1 2 unless $content->isa('PFT::Content::Blog')
528 0 2 unless $self->_path_to_date($content->path)
545 0 4 unless ($content->isa('PFT::Content::File'))
550 0 4 if $content->isa('PFT::Content::Month')
553 2 2 if $content->isa('PFT::Content::Blog')
573 0 1 unless opendir my $dh, $d
574 1 0 unless 'File::Spec'->no_upwards(readdir $dh)