Branch Coverage

blib/lib/Text/Parser/RuleSpec.pm
Criterion Covered Total %
branch 82 82 100.0


line true false branch
67 2 722 unless defined $cls
68 589 133 unless $this_cls->_class_has_rules($cls)
75 1 234 unless defined $cls
76 218 16 $class->_class_has_rules($cls) ? :
82 201 66 unless $class->class_has_rules($cls)
90 2 28 unless defined $cls and $class->_class_has_rules($cls)
124 43 11 defined $name ? :
125 4 50 if $meta->name eq 'main'
143 3 34 if not defined $name or '' ne ref $name or exists $rule_options{$name}
150 9 25 if _has_location_opts(%opt)
156 52 7 unless exists $opt{'before'}
161 3 34 if not @_ or scalar(@_) % 2
172 1 5 if exists $opt{'before'} and exists $opt{'after'}
173 5 3 exists $opt{'before'} ? :
175 1 7 unless defined $rule
179 2 5 unless 'Text::Parser::RuleSpec'->is_known_rule($opt{$loc})
182 2 3 if $cls eq $meta->name or not $is_super_rule
189 1 24 if 'Text::Parser::RuleSpec'->is_known_rule($key)
198 2 24 if exists $opt{'before'}
199 1 25 if exists $opt{'after'}
206 16 14 unless defined $meta->get_attribute($k)
221 23 2 unless _has_location_opts(@_)
233 1 1 exists $opt{'before'} ? :
261 14 22 if not $cls->_class_has_rules($meta->name)
294 1 2 if not _is_existing_rule($name, $meta)
305 3 3 if not defined $name or '' ne ref $name or exists $clone_options{$name}
310 1 2 if 'Text::Parser::RuleSpec'->is_known_rule($rname)
311 1 1 if $rname =~ m[/]
318 1 1 unless 'Text::Parser::RuleSpec'->is_known_rule($r)
326 1 1 unless defined $rname
328 1 1 unless 'Text::Parser::RuleSpec'->is_known_rule($nname)
352 1 5 unless @_
366 1 6 unless exists $disable_arg_types{$type_a}
367 4 2 if $type_a eq ''
372 1 3 unless $a =~ m[/]
376 1 2 if $c[0] eq $cls
390 4 1 _is_to_be_filtered($_, @_) ? :
404 4 5 if $test_for_filter_type{$t}->($r, $p)
418 1 7 if @_ != 4
429 3 4 unless exists $opt{'is_wrapped'} and exists $opt{'unwrap_routine'}
437 1 6 if 'CODE' ne ref $opt{$arg}