Branch Coverage

blib/lib/RDF/NLP/SPARQLQuery.pm
Criterion Covered Total %
branch 54 64 84.3


line true false branch
49 10 20 if (@_)
58 4 50 if (@_)
68 5 57 if (@_)
99 0 75 unless (defined $$self{'semtypecorresp'})
124 19 0 if ($language =~ /language=\"?(?[^"]+)\"?/)
155 0 9 unless open FILE, '<:utf8', $filename
159 110 0 unless ($line =~ /^\s*#/)
160 10 100 if ($line =~ /^DOC:\s?(?.*)/)
164 10 100 if ($line =~ /^language:\s?(?.*)/)
167 10 100 if ($line =~ /^sentence:\s/)
170 20 0 unless ($line =~ /^\s*#/ or $line =~ /^\s*$/)
171 10 10 if ($line ne '_END_SENT_') { }
180 10 100 if ($line =~ /^word information:/)
184 84 10 unless ($line =~ /^\s*#/ or $line =~ /^\s*$/)
185 74 10 if ($line ne '_END_POSTAG_') { }
203 10 100 if ($line =~ /^semantic units:/)
208 45 27 unless ($line =~ /^\s*#/ or $line =~ /^\s*$/ or exists $lines{$line})
209 35 10 if ($line ne '_END_SEM_UNIT_') { }
235 10 100 if ($line eq '_END_DOC_')
263 8 30 unless (defined $$self{'questions'})
285 9 0 if (@_)
287 9 0 if (exists $self->questions->{$docId})
298 0 10 unless (defined $docId)
302 10 0 if (@_)
338 4 3 if ($self->format eq 'XML')
355 6 3 if ($self->format eq 'XML')
359 1 8 if ($self->format eq 'SPARQL')
363 1 8 if ($self->format eq 'SPARQLANSWERS')
368 1 8 if ($self->format eq 'XMLANSWERS')
383 4 3 if ($self->format eq 'XML')
393 18 29 unless (defined $level)
397 0 47 if ($self->verbose > 0 and $self->verbose >= $level)