Branch Coverage

blib/lib/CGI/Listman.pm
Criterion Covered Total %
branch 0 168 0.0


line true false branch
50 0 0 if (defined $self->{'dbi_backend'}) { }
55 0 0 if $@
63 0 0 if (defined $self->{'list_name'}) { }
69 0 0 unless defined $self->{'table_name'}
76 0 0 if (defined $self->{'table_name'})
84 0 0 unless (defined $self->{'_dictionary'})
86 0 0 unless defined $self->{'list_dir'}
88 0 0 unless defined $self->{'list_name'}
91 0 0 unless -f $path
105 0 0 unless defined $self->{'list'}
111 0 0 if ($line->number == $number)
123 0 0 unless (defined $self->{'_dbi_params'})
125 0 0 unless defined $self->{'dbi_backend'}
126 0 0 if ($self->{'dbi_backend'} eq 'CSV') { }
128 0 0 unless (-f $self->{'list_dir'} . "/" . $self->{'table_name'} . ".csv")
136 0 0 unless $self->{'dbi_backend'} eq "mysql"
139 0 0 if defined $self->{'db_host'} and $self->{'db_host'} ne ""
141 0 0 if defined $self->{'db_port'} and $self->{'db_port'} ne ""
150 0 0 unless (defined $self->{'_db_fields'})
165 0 0 unless (defined $self->{'_db_connection'})
172 0 0 unless my $dbh = "DBI"->connect("DBI:" . $self->{'dbi_backend'} . $self->{'_dbi_params'}, $self->{'db_uname'}, $self->{'db_passwd'})
174 0 0 if ($self->{'dbi_backend'} eq "CSV")
188 0 0 if (defined $self->{'list'})
204 0 0 unless defined $self->{'list'} or defined $self->{'_loading_list'}
207 0 0 unless $line->{'number'}
211 0 0 if grep /$line->{'number'}/, @numbers
216 0 0 unless (defined $self->{'list'})
234 0 0 unless my $row_list = $dbh->selectall_arrayref("SELECT * FROM " . $self->{'table_name'})
238 0 0 if defined $self->{'list'}
240 0 0 if (defined $row_list)
255 0 0 if (defined $self->{'list'}) { }
260 0 0 unless $line->{'_deleted'}
283 0 0 unless defined $term
294 0 0 if $term->{'mandatory'} and !defined($param_hash_ref->{$key}) || $param_hash_ref->{$key} eq ''
310 0 0 unless defined $record
326 0 0 if defined $self->{'_commit'}
328 0 0 if (defined $self->{'list'})
333 0 0 if ($line->{'_updated'})
334 0 0 if $line->{'_deleted'} and $line->{'_new_line'}
335 0 0 if ($line->{'_deleted'}) { }
0 0 elsif ($line->{'_new_line'}) { }
339 0 0 unless $dbh->do("DELETE FROM " . $self->{'table_name'} . " WHERE number = " . $line->{'number'})
343 0 0 unless $line->{'timestamp'}
348 0 0 unless my $sth = $dbh->do("INSERT INTO " . $self->{'table_name'} . " VALUES (" . $record . ")")
353 0 0 unless $dbh->do("DELETE FROM " . $self->{'table_name'} . " WHERE number = " . $line->{'number'})
359 0 0 unless my $sth = $dbh->do("INSERT INTO " . $self->{'table_name'} . " VALUES (" . $record . ")")
373 0 0 unless $line->{'number'}
376 0 0 unless defined $list_ref
381 0 0 if ($list_ref->[$count] == $line)
388 0 0 if $count == @$list_ref
396 0 0 unless $list_ref
449 0 0 if defined $self->{'data'}
459 0 0 if defined $self->{'data'}
479 0 0 unless $number = $1
512 0 0 if defined $self->{'file_name'}
522 0 0 if defined $self->{'file_name'}
573 0 0 unless defined $self->{'file_name'}
578 0 0 unless open EFOUT, ">" . $self->{'file_name'}
586 0 0 if (-f $self->{'file_name'})
588 0 0 unless open EFIN, $self->{'file_name'}
628 0 0 unless defined $line
659 0 0 if $self->{'_loading'}
663 0 0 unless defined $self->{'filename'}
666 0 0 unless open DINF, $self->{'filename'}
678 0 0 if defined $self->get_term($key)
707 0 0 if (defined $terms_ref)
709 0 0 if $term->{'key'} ne $key
720 0 0 unless defined $self->{'_terms'}
732 0 0 if $comp_term == $term
746 0 0 unless ($new_pos > scalar @$terms_ref or $new_pos < 0 or $delta == 0)
752 0 0 if ($delta > 0) { }
753 0 0 if $count < $new_pos and $count >= $curr_pos
756 0 0 if $count > $new_pos and $count <= $curr_pos
759 0 0 if $count < $new_pos and $count < $curr_pos or $count > $new_pos and $count > $curr_pos
762 0 0 if $count == $new_pos
774 0 0 unless defined $increment
782 0 0 unless defined $decrement
806 0 0 unless open DOUTF, ">" . $self->{'filename'}
811 0 0 if defined $definition and $definition ne ""
812 0 0 if ($term->{'mandatory'})
813 0 0 defined $definition && $definition ne '' ? :
836 0 0 unless defined $key and $key ne ""
838 0 0 if defined $self->{'key'}
845 0 0 if defined $definition and $definition =~ /^\s+$/