Branch Coverage

blib/lib/Treex/Core/Scenario.pm
Criterion Covered Total %
branch 32 80 40.0


line true false branch
107 10 4 if ($self->_has_from_file) { }
4 0 elsif ($self->_has_from_string) { }
130 20 0 if ($block_item->{'block_parameters'})
136 8 11 if ($new_block->does('Treex::Core::DocumentReader')) { }
1 10 elsif ($new_block->isa('Treex::Block::Write::BaseWriter')) { }
137 0 8 if $self->_has_document_reader
146 0 10 if (ref $new_block eq 'Treex::Core::CacheBlock') { }
0 10 elsif ($self->cache) { }
158 0 0 if (defined $sequence{$sequence_from})
184 14 0 if eval {
191 0 0 unless -e $file
204 0 0 unless eval {
216 0 14 if ($self->runner and $self->runner->cache)
232 0 10 unless my $scenario_string = read_file($scenario_filename, 'binmode', ':utf8', 'err_mode', 'quiet')
243 2 12 unless defined $parsed
253 1 2 $multiline ? :
258 1 6 unless $name =~ s/^Treex::Block:://
260 2 5 if (scalar @parameters) { }
288 0 2 if ($value =~ /\s/)
291 0 0 if ($value =~ /'/ and not $value =~ /"/) { }
328 1 19 unless eval "use $block_name; 1;"
329 0 19 unless eval {
334 0 0 if ($self->cache and $params{'use_cache'})
344 0 1 unless $self->_has_document_reader
356 1 0 $document_number == 1 ? :
380 0 0 if ($block_number < $skip_to) { }
0 0 elsif ($block_number == $skip_to) { }
392 0 0 if ($sequence{$skip_from}{'to'} and $self->_is_known_sequence($sequence{$skip_from}{'hash'}, $document->get_hash)) { }
410 0 0 unless ($document)
417 0 0 if ($process == 1)
420 0 0 unless $block->is_started
426 0 0 if (defined $status and $status == $Treex::Core::Block::DOCUMENT_FROM_CACHE and $sequence{$skip_from}{'to'} and $self->_is_known_sequence($sequence{$skip_from}{'hash'}, $document->get_hash))
444 0 0 if (ref $block eq 'Treex::Core::CacheBlock')
451 0 0 if (defined $sequence{$from}{'document'})
462 0 0 if ($self->document_reader->jobindex)
470 0 0 if $block->is_started
512 0 1 if ($self->document_reader->jobindex)
519 1 0 $document_number == 1 ? :
531 2 0 unless $block->is_started
565 2 0 if $block->is_started