line |
true |
false |
branch |
24
|
0 |
19 |
if (@_ > 2 or $arg_type ne 'HASH') |
32
|
0 |
19 |
if ($opt_ref->{'debug'}) |
54
|
0 |
10 |
unless $$src_ref =~ s/
\A
(?
(?&PerlNWS)
(?{
$expected = 'new type name';
$failed_at = pos $_;
})
(? \$?+ )
(? (?&PerlIdentifier) )
(?&PerlOWS)
(?{
$expected = q['is '];
$failed_at = pos $_;
})
is
(?&PerlOWS)
(?{
$expected = q[existing typename or literal string or regex after 'is'];
$failed_at = pos $_;
})
(?
(? (?&PerlMatch) )
|
(? (?&PerlString) )
|
(? $TYPE_JUNCTION )
)
)
$PPR::GRAMMAR
//msux |
85
|
3 |
7 |
if ($keytype_info{'typesigil'}) |
87
|
2 |
1 |
if ($keytype_info{'oldtyperegex'}) { } |
|
1 |
0 |
elsif ($keytype_info{'oldtypestring'}) { } |
89
|
1 |
1 |
if ($keytype_info{'oldtyperegex'} =~ /\(\?\&Perl[A-Z]/u) |
103
|
0 |
10 |
if ($^H{'Keyword::Declare debug'}) |
129
|
138 |
19 |
@active_IDs ? : |
138
|
0 |
157 |
unless $$src_ref =~ s/
\A
(?<____K_D___KeywordDeclaration>
(?&PerlNWS)
(?<____K_D___keyword> (?&PerlIdentifier) )
(?&PerlOWS)
(?{
$expected = q[keyword parameters or block, or 'from' specifier];
$failed_at = pos $_;
})
(?<____K_D___params> (?&____K_D___ParamList) )
(?&PerlOWS)
(?{
$expected = 'keyword block or attribute';
$failed_at = pos $_;
})
(?<____K_D___attrs> (?&PerlAttributes)?+ )
(?&PerlOWS)
(?{
$expected = 'keyword block';
$failed_at = $block_start = pos $_;
})
(?<____K_D___block> \{\{\{ .*? \}\}\} | (?&PerlBlock) )
)
(?(DEFINE)
(?<____K_D___ParamList>
\(
(?&____K_D___ParamSet)?+
(?:
(?&PerlOWS) \) (?&PerlOWS) :then\(
(?{ push @params, undef; })
(?&____K_D___ParamSet)
)?+
\)
|
# Nothing
)
(?<____K_D___ParamSet>
(?&PerlOWS) (?&____K_D___Param)
(?: (?&PerlOWS) , (?&PerlOWS) (?&____K_D___Param) )*+
,?+ (?&PerlOWS)
)
(?<____K_D___Param>
(?{
$expected = 'keyword parameter type';
$failed_at = pos $_;
})
(?<____K_D___type> (?&PerlMatch) | (?&PerlString) | $TYPE_JUNCTION )
(?{
$expected = 'keyword parameter quantifier or variable';
$failed_at = pos $_;
})
(?: (?&PerlOWS) (?<____K_D___quantifier> [?*+][?+]?+ ) )?+
(?{
$expected = 'keyword parameter variable';
$failed_at = pos $_;
})
(?: (?&PerlOWS) (?<____K_D___sigil> [\$\@] )
(?<____K_D___name> (?&PerlIdentifier) ) )?+
(?: (?&PerlOWS) :sep \(
(?{
$expected = 'keyword parameter separator :sep';
$failed_at = pos $_;
})
(?&PerlOWS) (?<____K_D___sep> (?&PerlMatch) | (?&PerlString) | $TYPE_JUNCTION )
(?&PerlOWS) \)
)?+
(?: (?&PerlOWS) =
(?{
$expected = 'keyword parameter default string after =';
$failed_at = pos $_;
})
(?&PerlOWS) (?<____K_D___default> (?&PerlQuotelikeQ) ) )?+
(?{ push @params, {%+}; })
)
(?
keyword (?&____K_D___KeywordDeclaration)
|
$lexical_keywords
)
)
$PPR::GRAMMAR
//msux |
222
|
0 |
157 |
if ($keyword_info{'keyword'} =~ /^(?:keyword|keytype)$/u) |
231
|
23 |
134 |
if ($keyword_info{'block'} =~ / \A \{\{\{ /msux) |
252
|
0 |
157 |
if ($^H{'Keyword::Declare debug'}) |
298
|
0 |
1 |
if defined $keyword_info{'unexpected'} |
301
|
0 |
1 |
if ($keyword_info{'keyword'} =~ /^(?:keyword|keytype)$/u) |
306
|
0 |
1 |
if ($^H{'Keyword::Declare debug'}) |
317
|
0 |
1 |
if ($Keyword::Simple::VERSION < 0.04) |
341
|
0 |
334 |
unless $kw =~ /^[^\W\d]\w*\z/u |
342
|
0 |
334 |
unless ref $sub eq 'CODE' |
344
|
0 |
334 |
if ($VERSION < 0.04) { } |
372
|
0 |
1 |
unless substr($data, -1) eq "\n" |
388
|
1 |
333 |
unless defined $hash_ref |
447
|
76 |
0 |
@active_IDs ? : |
458
|
0 |
76 |
unless (@viable_IDs) |
465
|
0 |
0 |
eval "no strict;sub{\n" . ($PPR::ERROR // '') . '}' ? : |
479
|
23 |
53 |
if (@viable_IDs > 1) |
485
|
3 |
20 |
if (@viable_IDs > 1) |
490
|
1 |
22 |
if (@viable_IDs > 1) |
491
|
1 |
0 |
if (my(@preferred_IDs) = grep({$keyword_impls[$_]{'prefer'};} @viable_IDs)) |
497
|
0 |
23 |
if (@viable_IDs > 1) |
677
|
1 |
167 |
if ($type =~ /\A (?: q\s*\S | ' ) (.*) \S \z /ux) { } |
|
166 |
1 |
elsif ($type =~ /$REGEX_TYPE/u) { } |
|
1 |
0 |
elsif ($type =~ /$TYPE_JUNCTION/u) { } |
681
|
0 |
166 |
unless $type =~ /$REGEX_PAT/u |
705
|
163 |
15 |
if ($type =~ /\A \w++ (?: [|] \w++ )* \Z/ux) |
716
|
157 |
6 |
$param->{'name'} ? : |
725
|
7 |
171 |
if ($type =~ /\A (?: q\s*\S | ' ) (.*) \S \z /ux) { } |
|
171 |
0 |
elsif ($type =~ /$REGEX_TYPE/u) { } |
728
|
3 |
4 |
$param->{'name'} ? : |
736
|
0 |
171 |
unless $type =~ /$REGEX_PAT/u |
741
|
7 |
1 |
$param->{'name'} ? : |
771
|
36 |
92 |
unless keys %{$captures_ref;} |
795
|
1 |
176 |
unless (defined $param) |
805
|
2 |
174 |
if ($param->{'sep'}) |
810
|
0 |
176 |
if (exists $param->{'default'}) { } |
814
|
0 |
0 |
$param->{'sigil'} && $param->{'sigil'} eq '@' ? : |
817
|
3 |
154 |
$param->{'sigil'} && $param->{'sigil'} eq '@' ? : |
822
|
176 |
0 |
unless $param->{'type'} =~ m[^/\(\?\&Perl[ON]WS\)/$]u |
826
|
22 |
154 |
if ($param->{'quantifier'}) |
828
|
20 |
2 |
if (not $sep) { } |
834
|
1 |
1 |
if $param->{'quantifier'} eq '*' |
842
|
165 |
11 |
if ($param->{'name'}) |
848
|
174 |
2 |
if $not_post |
857
|
165 |
11 |
if ($param->{'name'}) { } |
858
|
12 |
153 |
$param->{'sigil'} ne '$' || $single_matcher =~ /\(\?
|
864
|
157 |
8 |
$param->{'sigil'} eq '$' ? : |
904
|
148 |
9 |
$sig_vars ? : |
913
|
3 |
154 |
if ($keyword_info_ref->{'attrs'}) |
921
|
0 |
3 |
if ($keyword_info_ref->{'attrs'} =~ s/\bdesc\( (.*?) \)//msux) { } |
929
|
0 |
3 |
if ($keyword_info_ref->{'attrs'} =~ s/\bprefix\( \s* (\$[^\W\d]\w*) \s* \)//msux) |
935
|
0 |
3 |
if $keyword_info_ref->{'attrs'} =~ s/\bthen\b//msux |
937
|
0 |
3 |
if $keyword_info_ref->{'attrs'} =~ /[^\s:]/u |
950
|
6 |
17 |
if ($block =~ / <\{ (? (? \s* \S*) .*? ) (?: <\{ | \302\253 | \Z ) /msux) |
954
|
0 |
6 |
unless $match{'interpolation'} =~ / \}> /msux |
956
|
10 |
13 |
if ($block =~ / \302\253 (? (? \s* \S*) .*? ) (?: <\{ | \302\253 | \Z ) /msux) |
960
|
0 |
10 |
unless $match{'interpolation'} =~ / \302\273 /msux |
971
|
43 |
22 |
if (exists $+{'literal_code'}) { } |
|
22 |
0 |
elsif (exists $+{'interpolation'}) { } |
993
|
19 |
99 |
if $args{$argname} eq '' |
1001
|
91 |
21 |
/\S/u ? : |
|
18 |
112 |
!defined($_) ? : |
1008
|
76 |
0 |
unless $keyword->{'keepspace'} |
1017
|
0 |
76 |
if ($^H{'Keyword::Declare debug'}) |
1037
|
0 |
4 |
if $count > $NESTING_THRESHOLD and $trace =~ /(\w++) --> .+ --> \1/u |
1055
|
1 |
7 |
if $type_a eq $type_b |
1058
|
0 |
7 |
$type_a =~ m[\A/|\Am\W]msux ? : |
|
0 |
7 |
$type_a =~ /\A'|\Aq\W/u ? : |
1059
|
2 |
5 |
$type_b =~ m[\A/|\Am\W]msux ? : |
|
0 |
7 |
$type_b =~ /\A'|\Aq\W/u ? : |
1062
|
5 |
2 |
if ($kind_a eq 'typename' and $kind_b eq 'typename') |
1063
|
3 |
2 |
if $isa{join $;, $type_a, $type_b} |
1064
|
2 |
0 |
if $isa{join $;, $type_b, $type_a} |
1082
|
2 |
6 |
if $is_narrower and $is_narrower == -$partial_ordering |
1098
|
0 |
14 |
if ($derived) { } |
1122
|
3 |
2 |
if ($narrowness > 0) { } |
|
0 |
2 |
elsif ($narrowness < 0) { } |
1132
|
1 |
2 |
unless $unique_narrowest |