line |
true |
false |
branch |
107
|
10 |
3 |
if ($self->_has_from_file) { }
|
|
3 |
0 |
elsif ($self->_has_from_string) { }
|
130
|
15 |
0 |
if ($block_item->{'block_parameters'})
|
136
|
0 |
7 |
if ($new_block->does('Treex::Core::DocumentReader')) { }
|
|
0 |
7 |
elsif ($new_block->isa('Treex::Block::Write::BaseWriter')) { }
|
137
|
0 |
0 |
if $self->_has_document_reader
|
146
|
0 |
7 |
if (ref $new_block eq 'Treex::Core::CacheBlock') { }
|
|
0 |
7 |
elsif ($self->cache) { }
|
158
|
0 |
0 |
if (defined $sequence{$sequence_from})
|
184
|
13 |
0 |
if eval {
do {
$parser = $self->_load_parser;
1
}
}
|
191
|
0 |
0 |
unless -e $file
|
204
|
0 |
0 |
unless eval {
do {
log_info('Trying to precompile it for you');
require Parse::RecDescent;
local $Treex::Core::Scenario::CWD = $dir;
'Parse::RecDescent'->Precompile({-'standalone', 1}, $grammar, 'Treex::Core::ScenarioParser');
$parser = $self->_load_parser;
1
}
} or eval {
do {
log_info('Cannot precompile, loading directly from grammar. Consider precompiling it manually');
require Parse::RecDescent;
$parser = 'Parse::RecDescent'->new($grammar);
1
}
}
|
216
|
0 |
13 |
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 |
11 |
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
|
8 |
7 |
unless eval "use $block_name; 1;"
|
329
|
0 |
7 |
unless eval {
do {
$new_block = $block_name->new(\%params);
1
}
}
|
334
|
0 |
0 |
if ($self->cache and $params{'use_cache'})
|
344
|
0 |
0 |
unless $self->_has_document_reader
|
356
|
0 |
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
|
425
|
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))
|
443
|
0 |
0 |
if (ref $block eq 'Treex::Core::CacheBlock')
|
450
|
0 |
0 |
if (defined $sequence{$from}{'document'})
|
461
|
0 |
0 |
if ($self->document_reader->jobindex)
|
469
|
0 |
0 |
if $block->is_started
|
511
|
0 |
0 |
if ($self->document_reader->jobindex)
|
518
|
0 |
0 |
$document_number == 1 ? :
|
530
|
0 |
0 |
unless $block->is_started
|
563
|
0 |
0 |
if $block->is_started
|