Branch Coverage

blib/lib/CGI/Uploader.pm
Criterion Covered Total %
branch 60 102 58.8


line true false branch
284 0 4 if $in{'dbh'}->get_info(17) eq 'PostgreSQL'
285 0 4 unless ($in{'db_driver'} eq 'mysql' or $in{'db_driver'} eq 'Pg' or $in{'db_driver'} eq 'SQLite')
289 0 4 unless ($in{'query'})
297 1 3 if (ref $in{'spec'}{$k} eq 'ARRAY')
306 2 23 unless defined $in{'up_table_map'}{$_}
405 2 0 if ($tmp_filename)
464 0 2 unless $$map{'gen_from_id'}
470 2 0 if ($q->param($file_field . '_delete'))
557 0 2 $$DBH{'Driver'}{'Name'} eq 'mysql' ? :
622 0 2 if ($q->isa('CGI::Simple')) { }
0 2 elsif ($q->isa('Apache::Request')) { }
627 0 0 if (not $fh and $q->cgi_error)
640 2 0 if $q->uploadInfo($fh)
642 0 2 if (not $fh and $q->cgi_error)
647 0 2 unless $fh and $filename
655 0 2 unless copy($fh, $tmp_filename)
705 0 4 if (my $meth = $$self{'spec'}{$file_field}{'transform_method'})
721 1 3 if ($id = $id_to_update)
797 2 2 if (ref $gen_file_key eq 'CODE') { }
2 0 elsif (ref $gen_file_key eq 'HASH') { }
925 0 8 if $browser->windows
926 0 8 if $browser->mac
927 0 8 if $browser->macosx
939 8 0 unless defined $fm_mt and length $fm_mt
948 7 1 $t ? :
956 7 1 if ($mt_exts[0]) { }
958 3 4 if (defined $uploaded_ext and grep {/^$uploaded_ext$/;} @mt_exts) { }
973 8 0 if ($ext) { }
974 8 0 if $ext
1036 1 7 if $id
1038 0 8 if (not $is_update and $$self{'db_driver'} eq 'Pg')
1045 37 17 if (exists $$map{$_})
1047 28 9 if $_ eq $$map{$_}
1059 1 7 if ($is_update) { }
1067 0 8 if (not $is_update and $$self{'db_driver'} eq 'mysql')
1070 7 1 if (not $is_update and $$self{'db_driver'} eq 'SQLite')
1148 5 0 if ($p{'prevent_browser_caching'})
1156 5 0 if ($fields{'url'})
1165 5 0 if (exists $fields{'id'})
1172 0 10 if defined $v
1230 0 8 unless copy($tmp_file, 'File::Spec'->catdir($$self{'updir_path'}, $self->build_loc($id, $ext)))
1257 0 6 unless $ext
1262 6 0 if (-e $file) { }
1290 19 1 if ($scheme eq 'simple') { }
1 0 elsif ($scheme eq 'md5') { }
1300 1 0 unless (-e $full_path)
1335 0 0 if ($q->isa('CGI::Simple')) { }
0 0 elsif ($q->isa('Apache::Request')) { }
1340 0 0 if grep {/^$potential_file_name/;} @list_of_files
1350 0 0 if $q->upload($field)
1382 2 1 defined $spec_key ? :