Branch Coverage

blib/lib/HTML/KhatGallery/Core.pm
Criterion Covered Total %
branch 0 204 0.0


line true false branch
184 0 0 if $self->{'verbose'}
232 0 0 unless (defined $self->{'top_dir'})
240 0 0 unless (defined $self->{'top_out_dir'})
248 0 0 if (defined $self->{'top_url'}) { }
263 0 0 unless (defined $self->{'dir_actions'})
279 0 0 unless (defined $self->{'clean_actions'})
291 0 0 unless (defined $self->{'image_actions'})
300 0 0 unless (defined $self->{'image_match'})
308 0 0 unless (defined $self->{'page_template'})
350 0 0 $self->{'clean'} ? :
354 0 0 if $state{'stop'}
393 0 0 if $images_state{'stop'}
430 0 0 if ($dir_state->{'dir'}) { }
463 0 0 unless (-f $captions_file)
468 0 0 if (-f $captions_file)
486 0 0 unless opendir $dh, $dir_state->{'abs_dir'}
492 0 0 if ($fn =~ /^\./ or $fn eq $self->{'thumbdir'}) { }
0 0 elsif (-d $abs_fn) { }
0 0 elsif ($fn =~ /\.html$/) { }
526 0 0 if (-d $dir_state->{'abs_out_dir'})
529 0 0 unless opendir $dh, $dir_state->{'abs_out_dir'}
533 0 0 if ($fn =~ /^\./ or $fn eq $self->{'thumbdir'}) { }
0 0 elsif ($fn =~ /index.*\.html$/) { }
559 0 0 if ($self->{'image_match'} and @{$dir_state->{'files'};})
579 0 0 if (@{$dir_state->{'files'};})
596 0 0 if ($self->{'dir_match'} and @{$dir_state->{'subdirs'};})
616 0 0 if (@{$dir_state->{'subdirs'};})
637 0 0 if ($pages == 0 and @{$dir_state->{'subdirs'};})
644 0 0 unless (-d $dir_state->{'abs_out_dir'})
658 0 0 if ($self->{'force_html'} or $dir_state->{'redo_html'})
667 0 0 if ($self->{'verbose'})
673 0 0 unless (-f $first_index)
685 0 0 if (-f $ifile)
693 0 0 if (@{$dir_state->{'files'};})
698 0 0 if $last > $num_files
728 0 0 unless open $fh, ">", $ifile
748 0 0 unless -d $dir
768 0 0 if ($name =~ s/\.html$//) { }
0 0 elsif ($name =~ /(.+)\.jpg$/i) { }
773 0 0 unless exists $pics_hash{$name}
782 0 0 unless exists $pics_hash{$name}
786 0 0 if ($remove)
787 0 0 if $self->{'verbose'}
789 0 0 unless unlink $fullname
821 0 0 if ($dir_state->{'dir'})
825 0 0 if $self->{'verbose'}
876 0 0 unless ($self->need_to_generate_image($dir_state, $img_state, "check_image", $thumb_file))
882 0 0 unless (-d $dir_state->{'abs_thumbdir'})
889 0 0 unless ($x and $y)
903 0 0 if ($img_state->{'cur_img'} =~ /\.gif$/) { }
912 0 0 unless system($command) == 0
931 0 0 if (-f $img_page_file and not $self->{'force_html'} and not $dir_state->{'redo_html'})
938 0 0 unless (-d $dir_state->{'abs_thumbdir'})
964 0 0 unless open $fh, ">", $img_page_file
1019 0 0 if (not $uplink and $page > 1) { }
1033 0 0 if ($uplinks{$dn}) { }
1050 0 0 if (exists $dir_state->{'captions'})
1053 0 0 if (exists $dir_state->{'captions'}{$index_caption} and defined $dir_state->{'captions'}{$index_caption})
1080 0 0 if ($dir_state->{'pages'} > 1)
1085 0 0 if ($page > 1)
1093 0 0 if ($dir_state->{'pages'} > 2)
1097 0 0 if ($page == $i) { }
1110 0 0 if ($page + 1 <= $dir_state->{'pages'})
1157 0 0 if (@{$dir_state->{'subdirs'};})
1192 0 0 if (@{$args{'images'};})
1235 0 0 if $page > 1
1307 0 0 if ($page == 1) { }
0 0 elsif ($dir_state->{'pages'} > 9) { }
1320 0 0 if ($args{'get_filename'}) { }
1358 0 0 if ($args{'type'} eq 'file') { }
0 0 elsif ($args{'type'} eq 'parent') { }
0 0 elsif ($args{'type'} eq 'sibling') { }
0 0 elsif ($args{'type'} eq 'pretty') { }
1408 0 0 if ($args{'type'} eq 'file') { }
0 0 elsif ($args{'type'} eq 'parent') { }
0 0 elsif ($args{'type'} eq 'sibling') { }
1444 0 0 if (exists $dir_state->{'captions'})
1446 0 0 if (exists $dir_state->{'captions'}{$image} and defined $dir_state->{'captions'}{$image})
1452 0 0 if ($img_state and defined $self->{'meta'} and @{$self->{'meta'};})
1459 0 0 if (exists $img_state->{'info'}{$field} and defined $img_state->{'info'}{$field} and $img_state->{'info'}{$field})
1488 0 0 if (not $template =~ /\n/ and -r $template)
1493 0 0 unless open $fh, $template
1536 0 0 if ($uplinks{$dn}) { }
1606 0 0 if ($dir_state->{'files'} > 1)
1614 0 0 if ($img_num > 0) { }
1634 0 0 if ($args{'use_thumb'})
1642 0 0 if ($img_num + 1 < @{$img_state->{'images'};}) { }
1661 0 0 if ($args{'use_thumb'})
1688 0 0 if ($self->{'top_dir'} ne $self->{'top_out_dir'})
1764 0 0 if (not -f $args{'check_image'} or $self->{'force_images'})
1791 0 0 if ($fn =~ /^\./ or $fn eq $self->{'thumbdir'}) { }
0 0 elsif (-d $abs_fn) { }
1812 0 0 if (exists $srcdir_has_dest{$dsd}) { }
1826 0 0 unless ($dir_exists)
1839 0 0 unless (-d $thumb_dir)
1841 0 0 @pics ? :
1863 0 0 if ($name =~ s/\.html$//) { }
0 0 elsif ($name =~ /(.+)\.jpg$/i) { }
1867 0 0 if (exists $pic_has_tn{$name}) { }
1884 0 0 if (exists $pic_has_tn{$name}) { }
1900 0 0 unless ($tn_exists)
1942 0 0 if ($level <= $self->{'debug_level'})