Branch Coverage

blib/lib/HTML/KhatGallery/Core.pm
Criterion Covered Total %
branch 0 202 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'})
888 0 0 if ($img_state->{'cur_img'} =~ /\.gif$/) { }
903 0 0 unless system($command) == 0
922 0 0 if (-f $img_page_file and not $self->{'force_html'} and not $dir_state->{'redo_html'})
929 0 0 unless (-d $dir_state->{'abs_thumbdir'})
955 0 0 unless open $fh, ">", $img_page_file
1010 0 0 if (not $uplink and $page > 1) { }
1024 0 0 if ($uplinks{$dn}) { }
1041 0 0 if (exists $dir_state->{'captions'})
1044 0 0 if (exists $dir_state->{'captions'}{$index_caption} and defined $dir_state->{'captions'}{$index_caption})
1071 0 0 if ($dir_state->{'pages'} > 1)
1076 0 0 if ($page > 1)
1084 0 0 if ($dir_state->{'pages'} > 2)
1088 0 0 if ($page == $i) { }
1101 0 0 if ($page + 1 <= $dir_state->{'pages'})
1148 0 0 if (@{$dir_state->{'subdirs'};})
1183 0 0 if (@{$args{'images'};})
1226 0 0 if $page > 1
1298 0 0 if ($page == 1) { }
0 0 elsif ($dir_state->{'pages'} > 9) { }
1311 0 0 if ($args{'get_filename'}) { }
1349 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') { }
1399 0 0 if ($args{'type'} eq 'file') { }
0 0 elsif ($args{'type'} eq 'parent') { }
0 0 elsif ($args{'type'} eq 'sibling') { }
1435 0 0 if (exists $dir_state->{'captions'})
1437 0 0 if (exists $dir_state->{'captions'}{$image} and defined $dir_state->{'captions'}{$image})
1443 0 0 if ($img_state and defined $self->{'meta'} and @{$self->{'meta'};})
1450 0 0 if (exists $img_state->{'info'}{$field} and defined $img_state->{'info'}{$field} and $img_state->{'info'}{$field})
1479 0 0 if (not $template =~ /\n/ and -r $template)
1484 0 0 unless open $fh, $template
1527 0 0 if ($uplinks{$dn}) { }
1597 0 0 if ($dir_state->{'files'} > 1)
1605 0 0 if ($img_num > 0) { }
1625 0 0 if ($args{'use_thumb'})
1633 0 0 if ($img_num + 1 < @{$img_state->{'images'};}) { }
1652 0 0 if ($args{'use_thumb'})
1679 0 0 if ($self->{'top_dir'} ne $self->{'top_out_dir'})
1755 0 0 if (not -f $args{'check_image'} or $self->{'force_images'})
1782 0 0 if ($fn =~ /^\./ or $fn eq $self->{'thumbdir'}) { }
0 0 elsif (-d $abs_fn) { }
1803 0 0 if (exists $srcdir_has_dest{$dsd}) { }
1818 0 0 unless ($dir_exists)
1832 0 0 unless (-d $thumb_dir)
1834 0 0 @pics ? :
1856 0 0 if ($name =~ s/\.html$//) { }
0 0 elsif ($name =~ /(.+)\.jpg$/i) { }
1860 0 0 if (exists $pic_has_tn{$name}) { }
1877 0 0 if (exists $pic_has_tn{$name}) { }
1893 0 0 unless ($tn_exists)
1935 0 0 if ($level <= $self->{'debug_level'})