Branch Coverage

blib/lib/PPIx/Regexp/Structure.pm
Criterion Covered Total %
branch 45 70 64.2


line true false branch
68 38 582 if ('HASH' eq ref $args[0]) { }
72 114 0 unless "ARRAY" eq ref $brkt{$key}
75 580 2 @args ? :
76 580 2 @args ? :
81 110 472 if (__instance($args[0], "PPIx::Regexp::Token::GroupType"))
91 0 620 unless my $self = $class->SUPER::__new(@args)
94 114 506 if (__instance($brkt{'type'}[0], "PPIx::Regexp::Token::GroupType"))
97 0 114 unless $reclass->can("start")
104 0 1860 unless "ARRAY" eq ref $brkt{$key}
107 58 1370 unless defined $val
108 0 1370 unless __instance($val, "PPIx::Regexp::Element")
117 4 616 unless @{$self->{'finish'};}
132 2950 1 if (wantarray) { }
1 0 elsif (defined wantarray) { }
157 0 1 if (my $type = $self->type)
160 1 0 if (my $start = $self->start)
189 193 517 if wantarray
190 353 164 defined $inx ? :
196 3 0 if $self->{'start'}[0]
198 0 0 if $self->{'type'}[0]
200 0 0 if (my $elem = $self->SUPER::first_element)
204 0 0 if $self->{'finish'}[0]
212 45 0 if $self->{'finish'}[-1]
214 0 0 if (my $elem = $self->SUPER::last_element)
218 0 0 if $self->{'type'}[-1]
220 0 0 if $self->{'start'}[-1]
253 222 517 if wantarray
254 359 158 defined $inx ? :
280 196 193 if wantarray
281 144 49 defined $inx ? :
290 8 4 unless __instance($args->[0], "PPIx::Regexp::Token::Unknown") and $args->[0]->content eq "?" and __instance($args->[1], "PPIx::Regexp::Token::Interpolation")
302 1 3 if (__instance($args->[2], "PPIx::Regexp::Token::Literal") and $args->[2]->content eq ":")
330 2 0 if (__instance($args->[2], "PPIx::Regexp::Token::Literal") and $args->[2]->content eq "-" and __instance($args->[3], "PPIx::Regexp::Token::Interpolation"))
336 1 1 if (__instance($args->[4], "PPIx::Regexp::Token::Literal") and $args->[4]->content eq ":")
368 0 0 if $args->[$inx]->significant