Branch Coverage

blib/lib/Dios.pm
Criterion Covered Total %
branch 251 352 71.3


line true false branch
101 223 3 $sub_name ? :
105 50 176 if (not defined $params or $params =~ /$EMPTY_PARAM_LIST/u)
107 46 4 $kind eq 'method' ? :
3 47 $std_slurpy ? :
114 46 4 $kind eq 'method' ? :
3 47 $std_slurpy ? :
125 107 69 $kind eq 'method' ? :
131 33 251 unless $param{'raw_param'} =~ /\S/u
134 3 248 if (defined $param{'is_num_constant'}) { }
7 241 elsif (defined $param{'is_str_constant'}) { }
2 239 elsif (defined $param{'is_regex_constant'}) { }
156 1 175 if (not @params and $kind eq 'method')
162 33 143 if ($params =~ s/ (?&WS) --> (?&WS) (.*+) (?(DEFINE) (? \s*+ (\# [^\n]*+ \n \s*+ )*+)) //msux)
167 0 176 if $params =~ /\S/u
180 1 251 if (defined $param->{'constraint'} and not defined $param->{'type'} && $param->{'type'} =~ /\S/u)
185 19 233 if (exists $param->{'nameless'})
187 5 2 $nameless_pos =~ /(?
1 7 $nameless_pos =~ /(?
11 8 $nameless_pos =~ /(?
199 0 252 if exists $param_named{$param->{'var'}}
207 0 0 exists $param->{'slurpy'} ? :
0 0 exists $param->{'name'} ? :
0 252 if substr($param->{'var'}, 1) eq '_' and $param->{'namedvar'} ne '*@_'
210 89 95 if ($first_param and $kind eq 'method' and $param->{'terminator'} ne ':')
216 18 234 if ($first_param and $param->{'terminator'} and $param->{'terminator'} eq ':') { }
214 20 elsif (not exists $param->{'slurpy'}) { }
217 0 18 if $kind ne 'method'
220 0 18 $param->{'constraint'} ? :
227 58 156 if (exists $param->{'name'}) { }
233 0 20 if defined $slurpy
238 2 18 if (exists $param->{'name'}) { }
241 0 2 if exists $param->{'name'} and $param->{'sigil'} ne '@'
251 104 72 if (@positional)
256 6 150 if ($param->{'sigil'} eq '@') { }
2 148 elsif ($param->{'sigil'} eq '%') { }
259 15 141 $param->{'constraint'} ? :
261 36 120 exists $param->{'default_type'} ? :
266 40 136 if (@named)
271 5 55 if ($param->{'sigil'} eq '@') { }
1 54 elsif ($param->{'sigil'} eq '%') { }
274 1 59 $param->{'constraint'} ? :
276 2 58 exists $param->{'default_type'} ? :
282 18 158 if (defined $slurpy) { }
283 17 1 if ($slurpy->{'var'} ne '@_')
284 0 17 $slurpy->{'constraint'} ? :
293 33 143 defined $return_type ? :
294 0 176 if (defined $return_constraint)
304 59 1 unless $param->{'required'}
323 0 153 if (exists $param->{'type'})
337 17 139 $var =~ /^(.)__nameless_(\d++[^\W_]++)_parameter__$/u ? :
346 36 120 if (exists $param->{'name'} and exists $param->{'default_type'})
347 9 27 if ($param->{'default_type'} eq '//=' and $param->{'sigil'} eq '$') { }
10 17 elsif ($param->{'default_type'} eq '||=') { }
358 101 55 unless exists $param->{'type'}
385 2 58 exists $param->{'slurpy'} ? :
389 2 58 if (exists $param->{'name'} and exists $param->{'default'})
393 0 1 $param->{'default_type'} eq '||=' ? :
1 1 $param->{'default_type'} eq '//=' ? :
404 20 40 unless exists $param->{'type'}
406 1 39 exists $param->{'slurpy'} ? :
421 0 17 unless defined $param
425 2 15 $param->{'var'} =~ /^(.)__nameless_.*_parameter__$/u ? :
430 2 15 if ($param->{'sigil'} eq '%')
435 1 0 $special eq 'alias' ? :
0 1 $special eq 'alias' && $] < 5.022 ? :
0 1 $special eq 'ro' ? :
16 1 !$special ? :
441 3 14 exists $param->{'default'} ? :
445 1 16 if (exists $param->{'type'})
450 1 16 if (exists $param->{'required'})
462 375 13 if ($sigil eq '$')
463 2 371 $special eq 'alias' ? :
0 373 $special eq 'alias' && $] < 5.022 ? :
2 373 $special eq 'ro' ? :
470 10 3 if ($sigil eq '@')
471 0 10 $special eq 'alias' ? :
0 10 $special eq 'alias' && $] < 5.022 ? :
0 10 $special eq 'ro' ? :
480 3 0 if ($sigil eq '%')
481 0 3 $special eq 'alias' ? :
0 3 $special eq 'alias' && $] < 5.022 ? :
0 3 $special eq 'ro' ? :
497 4 363 if ($special)
498 2 2 if ($special eq 'ro') { }
0 2 elsif ($special eq 'alias' and $] < 5.022) { }
500 0 2 unless eval { do { require Const::Fast; 1 } }
504 0 0 unless eval { do { require Data::Alias; 1 } }
513 36 331 if (defined $default)
514 0 1 $sigil eq '@' ? :
8 1 $sigil eq '$' ? :
517 33 3 $sigil eq '$' ? :
523 58 309 $name ? :
537 0 2 if ($special eq 'alias' and $] < 5.022)
539 0 0 unless eval { do { require Data::Alias; 1 } }
543 0 2 $special eq 'alias' ? :
0 2 $special eq 'alias' && $] >= 5.022 ? :
554 16 80 $constraint ? :
559 94 2 if ($sigil eq '$')
562 2 0 if ($sigil eq '@')
563 1 1 if $is_slurpy
566 0 0 if ($sigil eq '%')
751 1 29 $constraint ? :
752 0 30 if ($constraint and not defined $type)
757 14 16 $traits =~ /\brw\b/u ? :
767 8 15 $sigil eq '%' ? :
7 23 $sigil eq '@' ? :
774 28 2 if ($type)
781 3 27 $twigil ne '.' ? :
786 0 0 unless $delegation
787 0 0 if ($delegation =~ /^:(.*)<(.*)>$/msux) { }
796 19 11 $required ? :
800 15 0 if ($sigil =~ /[\@%]/u and !$initializer || $initializer =~ /\A \s*+ \z/msux)
805 16 14 if ($initializer =~ m[\A \s*+ (? // \s*+ )? = (? .*+ ) ]msux) { }
810 7 9 if ($sigil eq '@') { }
8 1 elsif ($sigil eq '%') { }
813 15 1 $init_field{'DEFAULT_INIT'} ? :
821 15 15 if ($sigil eq '$') { }
822 0 15 $] < 5.022 ? :
826 0 15 $] < 5.022 ? :
831 28 2 if ($type)
844 2 1 $constraint ? :
845 0 3 if ($constraint and not defined $type)
851 3 0 if (defined $type)
865 1 4 $constraint ? :
866 0 5 if ($constraint and not defined $type)
875 1 4 $traits =~ /\brw\b/u ? :
879 0 5 $twigil ne '.' ? :
883 1 4 if ($type) { }
891 1 4 if ($type)
913 28 30 if ($kind eq 'method') { }
926 103 187 if (defined $match) { }
936 25 33 if @variants == 1
941 6 0 $args =~ /\A \( .* \) \Z/msux ? :
944 6 27 if @variants == 0
952 0 0 $args =~ /\A \( .* \) \Z/msux ? :
955 0 27 if @variants == 0
1048 65 0 if ($invocant_name =~ /\A (\$?+) ([^\W\d]\w*+) \Z/msux) { }
1057 65 0 if (((&CORE::GLOBAL::caller(0))[3] // '') =~ /\b(?:un)?import\Z/u)
1062 42 968 if defined $_
13 35 @bases ? :
1065 65 0 if (((&CORE::GLOBAL::caller(0))[3] // '') =~ /\b(?:un)?import\Z/u)
1068 0 0 if defined $_
0 0 @bases ? :
1075 30 23 if (my $return_type = $parameter_list->{'return_type'}) { }
1079 22 1 $sub_name ? :
1086 65 0 if (((&CORE::GLOBAL::caller(0))[3] // '') =~ /\b(?:un)?import\Z/u)
1093 0 0 if (my $return_type = $parameter_list->{'return_type'}) { }
1097 0 0 $sub_name ? :
1102 0 34 if (my $return_type = $parameter_list->{'return_type'}) { }
1117 65 0 if (((&CORE::GLOBAL::caller(0))[3] // '') =~ /\b(?:un)?import\Z/u)
1124 0 131 $] < 5.022 ? :
1125 17 114 $^H{'Dios attrs'} ? :
1129 0 0 if (my $return_type = $parameter_list->{'return_type'}) { }
1131 129 2 $sub_name ? :
1137 65 0 if (((&CORE::GLOBAL::caller(0))[3] // '') =~ /\b(?:un)?import\Z/u)
1141 0 0 $] < 5.022 ? :
1142 0 0 $^H{'Dios attrs'} ? :
1144 0 8 $] < 5.022 ? :
1145 3 5 $^H{'Dios attrs'} ? :
1148 0 0 $sub_name ? :
1149 4 4 if ($sub_name eq 'BUILD') { }
3 1 elsif ($sub_name eq 'DESTROY') { }
1164 0 3 if $parameter_list and not $parameter_list =~ /^\(\s*+\)$/u
1181 8 0 $sub_name ? :
1191 0 0 $] < 5.022 ? :
1192 0 0 $^H{'Dios attrs'} ? :
1196 0 0 if ($sub_name eq 'BUILD') { }
0 0 elsif ($sub_name eq 'DESTROY') { }
1211 0 0 if $parameter_list and not $parameter_list =~ /^\(\s*+\)$/u
1213 65 0 if (((&CORE::GLOBAL::caller(0))[3] // '') =~ /\b(?:un)?import\Z/u)
1227 65 0 if (((&CORE::GLOBAL::caller(0))[3] // '') =~ /\b(?:un)?import\Z/u)
1228 0 0 $sub_name ? :
1238 65 0 if (((&CORE::GLOBAL::caller(0))[3] // '') =~ /\b(?:un)?import\Z/u)
1244 65 0 if (((&CORE::GLOBAL::caller(0))[3] // '') =~ /\b(?:un)?import\Z/u)
1247 65 0 if (((&CORE::GLOBAL::caller(0))[3] // '') =~ /\b(?:un)?import\Z/u)
1248 65 0 if (((&CORE::GLOBAL::caller(0))[3] // '') =~ /\b(?:un)?import\Z/u)