Branch Coverage

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


line true false branch
68 38 578 if ('HASH' eq ref $args[0]) { }
72 114 0 unless "ARRAY" eq ref $brkt{$key}
75 576 2 @args ? :
76 576 2 @args ? :
81 110 468 if (__instance($args[0], "PPIx::Regexp::Token::GroupType"))
91 0 616 unless my $self = $class->SUPER::__new(@args)
94 114 502 if (__instance($brkt{'type'}[0], "PPIx::Regexp::Token::GroupType"))
97 0 114 unless $reclass->can("start")
104 0 1848 unless "ARRAY" eq ref $brkt{$key}
107 56 1363 unless defined $val
108 0 1363 unless __instance($val, "PPIx::Regexp::Element")
117 4 612 unless @{$self->{'finish'};}
132 2942 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 191 515 if wantarray
190 351 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 218 515 if wantarray
254 357 158 defined $inx ? :
280 194 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