| line | % | coverage | condition |
| 1355 | 50 | | Params::Get::get_params('input_file', @_) || {} |
| 1369 | 50 | | $params->{'allow_signature_exec'} // 0 |
| 100 | | $params->{'verbose'} // 0 |
| 100 | | $params->{'include_private'} // 0 |
| 67 | | $params->{'confidence_threshold'} // $DEFAULT_CONFIDENCE_THRESH |
| 67 | | $params->{'max_parameters'} // $DEFAULT_MAX_PARAMETERS |
| 1457 | 100 | | Params::Get::get_params(undef, @_) || {} |
| 1470 | 67 | | $self->{'_package_name'} //= $package_name |
| 1520 | 100 | | $document->find('PPI::Statement::Package') || [] |
| 1526 | 67 | | $self->{'_package_name'} //= $pkgs->[0]->namespace |
| 1562 | 100 | | $document->find('PPI::Statement::Sub') || [] |
| 1569 | 50 | | $document->find(sub {
$_[1]->content =~ /^\s*(?:before|after|around)\b/ if $_[1]->isa('PPI::Statement');
}
) || [] |
| 1580 | 100 | | $name =~ /^_/ and not $name =~ /^_(new|init|build)/ |
| 1618 | 0 | | $next_sib and not $next_sib->isa("PPI::Statement::Sub") |
| 1622 | 0 | | $next_sib and $next_sib->isa("PPI::Statement::Sub") |
| 1707 | 50 | | $2 || '()' |
| 1710 | 33 | | $method_name =~ /^_/ and not $method_name =~ /^_(new|init|build)/ |
| 1775 | 67 | | $current and $steps++ < $POD_WALK_LIMIT |
| 1776 | 67 | | $current->isa("PPI::Token::Whitespace") or $current->isa("PPI::Token::Separator") |
| 1848 | 67 | | $method->{'fields'} and keys %{$$method{"fields"};} |
| 1871 | 67 | | $self->{'strict_pod'} and $pod |
| 1916 | 0 | | $schema->{'input'}{$name} //= {} |
| 1954 | 100 | | $method->{'name'} ne "new" and $needs_object |
| 1970 | 100 | | $schema->{'_analysis'} ||= {} |
| 1973 | 100 | | $schema->{'_analysis'}{'confidence_factors'} ||= {} |
| 1974 | 100 | | $schema->{'_analysis'}{'confidence_factors'}{'input'} ||= $input_confidence->{'factors'} |
| 1975 | 33 | | $schema->{'_analysis'}{'confidence_factors'}{'output'} ||= $output_confidence->{'factors'} |
| 1999 | 100 | | $input_level //= "none" |
| 2000 | 50 | | $output_level //= "none" |
| 2007 | 67 | | $relationships and @{$relationships;} |
| 2037 | 50 | | $schema->{'_yamltest_hints'} ||= {} |
| 2040 | 50 | | $schema->{'_yamltest_hints'}{'boundary_values'} ||= [] |
| 2054 | 100 | | $schema->{'_yamltest_hints'} ||= {} |
| 2061 | 100 | | $level_rank{$overall} < $level_rank{$LEVEL_MEDIUM} and $level_rank{$overall} < $self->{'confidence_threshold'} * 4 |
| 2148 | 75 | | $schema->{'output'} and $schema->{'output'}{'type'} and $schema->{'output'}{'type'} =~ /^(number|integer)$/ |
| 2153 | 67 | | $p->{'type'} and $p->{'type'} =~ /^(number|integer)$/ |
| 2232 | 50 | | $code =~ /\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*=\s*shift\s*;/ and $code =~ /return\s+\$self\s*->\s*\{\s*['"]?\Q$1\E['"]?\s*\}\s*;/ and $code =~ /if\s*\(\s*\@_/ |
| 75 | | $code =~ /if\s*\(\s*(?:\@_|[\$]\w+)/ and $code =~ /\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*=\s*(?:shift|\@_|\$_\[\d+\]|\$\w+)\b/x and $code =~ /return\b/ |
| 100 | | $code =~ /return\s+\$self\b/ and $code =~ /\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*=\s*\$(\w+)\s*;/ |
| 2253 | 0 | | $schema->{'input'} ||= {"value", {"type", "string", "optional", 1}} |
| 2319 | 50 | | $schema->{'input'} ||= {"value", {"type", "string", "optional", 1}} |
| 2439 | 50 | | $schema->{'accessor'}{'type'} and $schema->{'accessor'}{'type'} =~ /setter|getset/ and $schema->{'input'} |
| 2443 | 100 | | $in->{'type'} and $in->{'type'} eq "object" |
| 2457 | 67 | | A | B | C | D | E | dec |
|---|
| 0 | X | X | X | X | 0 | | 1 | 0 | X | X | X | 0 | | 1 | 1 | 0 | X | X | 0 | | 1 | 1 | 1 | 0 | 0 | 0 | | 1 | 1 | 1 | 0 | 1 | 1 | | 1 | 1 | 1 | 1 | X | 1 |
| $schema->{'accessor'}{'type'} and $schema->{'accessor'}{'property'} and $schema->{'accessor'}{'type'} =~ /getter|getset/ and !defined($schema->{'output'}{'type'}) || $schema->{'output'}{'type'} eq 'string' |
| 2492 | 100 | | $args{'method'} // "UNKNOWN" |
| 2493 | 100 | | $args{'message'} // "Analysis error" |
| 2495 | 100 | | $self->{'_package_name'} // "UNKNOWN" |
| 2496 | 100 | | $self->{'input_file'} // "UNKNOWN" |
| 2536 | 50 | | $res and ref $res eq "HASH" and keys %{{} unless $res->{'input'};} |
| 2570 | 33 | | $child->isa("PPI::Statement") or $child->isa("PPI::Statement::Expression") |
| 2574 | 0 | | $_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator') |
| 2579 | 0 | | A | B | C | dec |
|---|
| 0 | 0 | X | 0 | | 0 | 1 | 0 | 0 | | 0 | 1 | 1 | 1 | | 1 | X | 0 | 0 | | 1 | X | 1 | 1 |
| $tokens[$i]->isa('PPI::Token::Word') || $tokens[$i]->isa('PPI::Token::Quote') and $tokens[$i + 1]->isa("PPI::Structure::Constructor") |
| 2588 | 0 | | $key and $val |
| 2592 | 0 | | $inner->isa("PPI::Statement") or $inner->isa("PPI::Statement::Expression") |
| 2595 | 0 | | $_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator') |
| 2599 | 0 | | $k and $v |
| 2605 | 0 | | $keyname =~ /^(min|max)$/ and &looks_like_number($value) |
| 2616 | 0 | | $param{'type'} //= "string" |
| 2617 | 0 | | $param{'optional'} //= 0 |
| 2658 | 67 | | ref $code and $code->can("find") |
| 2660 | 100 | | $self->{'_ppi_cache'} ||= {} |
| 2661 | 67 | | $self->{'_ppi_cache'}{$code} //= "PPI::Document"->new(\$code) |
| 2689 | 100 | | $_[1]->content eq "validate_strict" or $_[1]->content eq "Params::Validate::Strict::validate_strict" |
| 2694 | 67 | | $list and not $list->isa("PPI::Structure::List") |
| 2754 | 100 | | $_[1]->content eq "validate" or $_[1]->content eq "Params::Validate::validate" |
| 2759 | 67 | | $list and not $list->isa("PPI::Structure::List") |
| 2766 | 33 | | $schema_text and not $schema_text =~ /$UNSAFE_KEYWORD_RE/ |
| 2901 | 67 | | $list and not $list->isa("PPI::Structure::List") |
| 2908 | 33 | | $schema_text and not $schema_text =~ /$UNSAFE_KEYWORD_RE/ |
| 2989 | 67 | | $block and $block->can("children") |
| 2993 | 0 | | $result and ref $result eq "HASH" and $result->{'input'} |
| 3239 | 33 | | $signature_expr =~ /$UNSAFE_KEYWORD_RE/ or $signature_expr =~ /$UNSAFE_CHAR_RE/ |
| 3347 | 67 | | $stderr and length $stderr |
| 3355 | 67 | | defined $stdout and length $stdout |
| 3411 | 100 | | $type_map{$p->{'type'}} // "string" |
| 3430 | 50 | | $type_map{$ret->{'type'}} // "string" |
| 3502 | 33 | | @sig_params and $sig_params[0] =~ /^(self|class)$/i |
| 3506 | 33 | | $params{$param}{'position'} //= $position_counter |
| 3536 | 67 | | $line =~ /^\s*\$(\w+)\s*-\s*(\w+)(?:\s*\(([^)]+)\))?\s*,?\s*(.*)$/i or $line =~ /^\s*C<\$(\w+)>\s*-\s*(\w+)(?:\s*\(([^)]+)\))?\s*,?\s*(.*)$/i |
| 3546 | 100 | | $params{$name} ||= {"_source", "pod"} |
| 3556 | 33 | | $type eq "num" or $type eq "float" |
| 3570 | 100 | | $desc || '' |
| 100 | | $constraint || '' |
| 3587 | 100 | | $desc and $desc =~ m[matches?\s+(/[^/]+/|qr/.+?/)]i |
| 3611 | 50 | | $params{$name} ||= {"_source", "pod"} |
| 3615 | 33 | | $type eq "num" or $type eq "float" |
| 3652 | 33 | | defined $name and length $name |
| 3659 | 100 | | $params{$name} ||= {"_source", "pod"} |
| 3669 | 33 | | $type eq "num" or $type eq "float" |
| 3748 | 50 | | $params{$_}{'position'} // -1 |
| 3767 | 100 | | $params{$name} //= {"_source", "pod"} |
| 3975 | 33 | | not $output->{'type'} and $returns_desc =~ /\bundef\b/i |
| 67 | | not $output->{'type'} and $returns_desc =~ /\b(string|text)\b/i |
| 67 | | not $output->{'type'} and $returns_desc =~ /\b(integer|int|count)\b/i |
| 33 | | not $output->{'type'} and $returns_desc =~ /\b(float|decimal|number)\b/i |
| 67 | | not $output->{'type'} and $returns_desc =~ /\b(boolean|true|false)\b/i |
| 33 | | not $output->{'type'} and $returns_desc =~ /\b(array|list)\b/i |
| 33 | | not $output->{'type'} and $returns_desc =~ /\b(hash|hashref|dictionary)\b/i |
| 67 | | not $output->{'type'} and $returns_desc =~ /\b(object|instance)\b/i |
| 3996 | 33 | | defined $output->{'type'} and $output->{'type'} eq "scalar" |
| 3999 | 50 | | $output->{'type'} ||= "boolean" |
| 4009 | 50 | | $output->{'type'} ||= "boolean" |
| 4017 | 100 | | not $output->{'type'} and $pod =~ /returns?\s+(?:an?\s+)?(\w+)/i |
| 4028 | 33 | | $type eq 1 or $type eq 0 |
| 4042 | 33 | | not $type and $pod =~ /returns?\s+.+\slist\b/i |
| 4171 | 100 | | $boolean_count >= 2 and $boolean_count >= $total_count * "0.8" |
| 4181 | 100 | | $code =~ /return\s+\$self\s*;/ and $code =~ /\$self\s*->\s*\{[^}]+\}\s*=/ |
| 4186 | 0 | | $self->{'_document'} and my $package_stmt = $self->{'_document'}->find_first("PPI::Statement::Package") |
| 4188 | 0 | | $self->{'_package_name'} //= $output->{'isa'} |
| 4213 | 0 | | $output->{'isa'} || 'UNKNOWN' |
| 4214 | 0 | | $self->{'_package_name'} //= $output->{'isa'} |
| 4227 | 50 | | $output->{'isa'} || 'UNKNOWN' |
| 4228 | 33 | | $self->{'_package_name'} //= $output->{'isa'} |
| 4252 | 100 | | $ret =~ /=/ and $ret =~ /\$\w+/ |
| 100 | | $ret eq 1 or $ret eq 0 |
| 4326 | 67 | | $return_types{'integer'} and not $return_types{'string'} |
| 4327 | 67 | | not $output->{'type'} or $output->{'type'} eq "scalar" |
| 4330 | 50 | | $output->{'_type_confidence'} ||= "low" |
| 4341 | 50 | | $output->{'_type_confidence'} ||= "medium" |
| 4352 | 100 | | @return_statements == 1 and $return_statements[0] eq 1 |
| 4354 | 33 | | not $output->{'type'} or $output->{'type'} eq "scalar" |
| 4396 | 67 | | not $output->{'type'} or $output->{'type'} eq "unknown" |
| 4399 | 67 | | $pod and not $output->{'type'} |
| 4459 | 20 | | A | B | C | D | dec |
|---|
| 0 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 1 | 1 | | 0 | 0 | 1 | X | 1 | | 0 | 1 | X | X | 1 | | 1 | X | X | X | 1 |
| not $output->{'type'} or $output->{'type'} eq "scalar" or $output->{'type'} eq "array" or $output->{'type'} eq "undef" |
| 4460 | 50 | | $output->{'type'} || 'none' |
| 4548 | 67 | | $comma_count > 0 and not $content =~ /\b(?:bless|new)\b/ |
| 4550 | 67 | | $output->{'type'} and $output->{'type'} eq "boolean" |
| 4634 | 100 | | $no_value_returns > 0 and $no_value_returns == $total_returns |
| 75 | | $true_returns > 0 and $true_returns == $total_returns and $total_returns >= 1 |
| 4642 | 100 | | $output->{'type'} and $output->{'type'} eq "boolean" |
| 4686 | 67 | | $self_returns > 0 and $total_returns > 0 |
| 4697 | 33 | | $self->{'_package_name'} //= $output->{'isa'} |
| 4766 | 100 | | $zero_returns > 0 and $one_returns > 0 |
| 4783 | 67 | | /^\s*undef\s*$/ || /^\s*$/ |
| 4785 | 50 | | $has_undef and $has_value and scalar @all_returns >= 2 |
| 4866 | 75 | | $expr =~ /^\@\w+/ or $expr =~ /^qw\(/ or $expr =~ /^\@\{/ |
| 4876 | 100 | | $expr =~ /^\[/ or $expr =~ /^\\\@/ |
| 4881 | 100 | | $expr =~ /^\{/ or $expr =~ /^\\\%/ |
| 4886 | 33 | | $expr =~ /^\%\w+/ or $expr =~ /^\%\{/ |
| 4891 | 67 | | $expr =~ /^['"]/ or $expr =~ /['"]$/ |
| 4946 | 80 | | A | B | C | D | dec |
|---|
| 0 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 1 | 1 | | 0 | 0 | 1 | X | 1 | | 0 | 1 | X | X | 1 | | 1 | X | X | X | 1 |
| $pod =~ /returns?\s+(?:\$)?self\b/i or $pod =~ /chainable/i or $pod =~ /fluent\s+interface/i or $pod =~ /method\s+chaining/i |
| 4978 | 100 | | defined $output->{'type'} and $output->{'type'} eq "boolean" and not defined $output->{'value'} |
| 4981 | 50 | | $output->{'value'} and defined $output->{'type'} and $output->{'type'} ne "boolean" |
| 5037 | 67 | | $param->{'type'} and $param->{'type'} eq "integer" |
| 5038 | 67 | | $param->{'type'} and $param->{'type'} eq "number" |
| 5114 | 50 | | $params{$name} //= {"_source", "code", "position", $pos++} |
| 5123 | 100 | | $params{$param}{'_default'} and not $params{$param}{'type'} |
| 5178 | 50 | | $$p->{'type'} //= "number" |
| 5183 | 0 | | $$p->{'type'} //= "number" |
| 5268 | 67 | | $code =~ /\%\{\s*\$$param\s*\}/ or $code =~ /\$$param\s*->\s*\{/ |
| 33 | | $code =~ /\@\{\s*\$$param\s*\}/ or $code =~ /push\s*\(\s*\@?\$$param/ |
| 5276 | 100 | | not $p->{'type'} and exists $p->{'_default'} |
| 5297 | 100 | | $code =~ /\$$param\s*(?:==|!=|<=|>=|<|>)/ or $code =~ /(?:==|!=|<=|>=|<|>)\s*\$$param/ |
| 60 | | A | B | C | D | dec |
|---|
| 0 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 1 | 1 | | 0 | 0 | 1 | X | 1 | | 0 | 1 | X | X | 1 | | 1 | X | X | X | 1 |
| $code =~ m[\$$param\s*(?:[\+\-\*\%]|/(?!/))] or $code =~ m[(?:[\+\-\*\%]|/(?!/))\s*\$$param] or $code =~ /\bint\s*\(\s*\$$param\s*\)/ or $code =~ /\babs\s*\(\s*\$$param\s*\)/ |
| 5396 | 33 | | defined $param and $param =~ /^\w+$/ |
| 5417 | 33 | | $code =~ /\$$param\s*->\s*isa\s*\(\s*['"]Time::Piece['"]\s*\)/i or $code =~ /\$$param\s*->\s*(strftime|epoch|year|mon|mday)/ |
| 5445 | 50 | | $code =~ /\$$param\s*>\s*\d{9,}/ or $code =~ /time\(\s*\)\s*-\s*\$$param/ or $code =~ /\$$param\s*-\s*time\(\s*\)/ |
| 5456 | 33 | | $code =~ /strptime\s*\(\s*\$$param/ or $code =~ /DateTime::Format::\w+\s*->\s*parse_datetime\s*\(\s*\$$param/ |
| 5489 | 33 | | defined $param and $param =~ /^\w+$/ |
| 5518 | 33 | | $code =~ /File::(?:Spec|Basename)::\w+\s*\(\s*\$$param/ or $code =~ /(?:basename|dirname|fileparse)\s*\(\s*\$$param/ |
| 5528 | 67 | | defined $p->{'_default'} and $p->{'_default'} =~ m[^([A-Za-z]:\\|/|\./|\.\./)] |
| 5536 | 33 | | $code =~ /\$$param\s*->\s*isa\s*\(\s*['"]IO::File['"]\s*\)/ or $code =~ /IO::File\s*->\s*new\s*\(\s*\$$param/ |
| 5569 | 33 | | defined $param and $param =~ /^\w+$/ |
| 5580 | 50 | | $code =~ /\$$param\s*->\s*\(/ or $code =~ /\$$param\s*->\s*\(\s*\@_\s*\)/ or $code =~ /&\s*\{\s*\$$param\s*\}/ |
| 5598 | 33 | | $code =~ /blessed\s*\(\s*\$$param\s*\)/ and $code =~ /ref\s*\(\s*\$$param\s*\)\s*eq\s*['"]CODE['"]/i |
| 5637 | 33 | | defined $param and $param =~ /^\w+$/ |
| 5657 | 67 | | defined $values_str and $code =~ /\$$hash_name\s*\{\s*\$$param\s*\}/ |
| 5713 | 33 | | $code =~ /\$$param\s*~~\s*\[([^\]]+)\]/ or $code =~ /\$$param\s*~~\s*qw\s*[\(\[<{]([^)\]>}]+)[\)\]>}]/ |
| 5772 | 67 | | $1 || $2 |
| 5779 | 100 | | $$p->{'_invalid'} ||= [] |
| 5780 | 100 | | $$p->{'_errors'} ||= [] |
| 5893 | 50 | | $params->{$name} //= {"_source", "code", "optional", 1, "position", $pos++} |
| 5909 | 50 | | $params->{$name} //= {"_source", "code", "optional", 1} |
| 5925 | 33 | | @shifts and $shifts[0] =~ /^(self|class)$/i |
| 5928 | 50 | | $params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++} |
| 5940 | 0 | | $params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++} |
| 6187 | 33 | | $default eq 1 or $default eq 0 |
| 6243 | 67 | | defined $value and $value ne "" |
| 6454 | 50 | | $params->{$param_name} ||= {} |
| 6575 | 50 | | $params->{$param} ||= {} |
| 6611 | 100 | | keys %{$params;} || $code =~ /my\s+\$(?:self|class)\s*=\s*\$_\[0\]/ |
| 6618 | 50 | | $var eq "class" and $position == 0 and $method->{'name'} eq "new" |
| 25 | | $var eq "self" and $position == 0 and $method->{'name'} ne "new" |
| 6625 | 0 | | $params->{$var} ||= {"position", $position++} |
| 6634 | 50 | | $var eq "class" and $position == 0 and $method->{'name'} eq "new" |
| 50 | | $var eq "self" and $position == 0 and $method->{'name'} ne "new" |
| 6641 | 50 | | $params->{$var} ||= {"position", $position++} |
| 6649 | 0 | | $var ne "class" or $position > 0 or $method->{'name'} ne "new" |
| 6650 | 0 | | $params->{$var} ||= {"position", $index} |
| 6767 | 50 | | $p->{'type'} ||= "string" |
| 6785 | 100 | | $p->{'type'} ||= "string" |
| 6799 | 100 | | not $guarded and $code =~ /\$$param\s*([<>]=?)\s*([+-]?(?:\d+\.?\d*|\.\d+))/ |
| 6804 | 33 | | $p->{'type'} ||= &looks_like_number($val) ? "number" : "integer" |
| 6806 | 67 | | $op eq ">" or $op eq ">=" |
| 67 | | $op eq "<" or $op eq "<=" |
| 6809 | 33 | | not defined $p->{'max'} or $max < $p->{'max'} |
| 6812 | 33 | | not defined $p->{'min'} or $min > $p->{'min'} |
| 6819 | 50 | | $p->{'type'} ||= "string" |
| 6869 | 100 | | defined $default_value and not exists $p->{'_default'} |
| 6875 | 0 | | defined $default_value and not ref $default_value |
| 6893 | 100 | | not $default_value || exists $p->{'_default'} and $code =~ /\$$param\s*=\s*([^;{}]+?)(?:\s*[;}])/s |
| 100 | | $default_value || exists $p->{'_default'} |
| 6896 | 67 | | $assignment =~ /\$$param/ or $assignment =~ /^shift/ |
| 6963 | 100 | | $pod->{$param} and defined $pod->{$param}{'position'} |
| 6964 | 33 | | $sig->{$param} and defined $sig->{$param}{'position'} |
| 6965 | 100 | | $code->{$param} and defined $code->{$param}{'position'} |
| 6988 | 80 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 |
| $key eq "type" and $pod->{$param} and $pod->{$param}{'_from_input_spec'} and not defined $pod->{$param}{'type'} |
| 6992 | 83 | | A | B | C | D | E | dec |
|---|
| 0 | 0 | X | X | X | 0 | | 0 | 1 | 0 | X | X | 0 | | 0 | 1 | 1 | 0 | X | 0 | | 0 | 1 | 1 | 1 | 0 | 0 | | 0 | 1 | 1 | 1 | 1 | 1 | | 1 | X | X | X | X | 1 |
| not exists $p->{$key} or $key eq "type" and $from_pod and $p->{'type'} eq "string" and $code->{$param}{$key} ne "string" |
| 7005 | 0 | | $p->{$key} //= $sig->{$param}{$key} |
| 7018 | 50 | | $merged{$b}{'position'} || 999 |
| 50 | | $merged{$a}{'position'} || 999 |
| 7023 | 50 | | $p->{'type'} || 'none' |
| 100 | | $p->{'position'} || 'none' |
| 7121 | 100 | | $p->{'type'} eq "string" and $p->{'min'} || $p->{'max'} || $p->{'matches'} |
| 7318 | 100 | | $output->{'_error_handling'} and $output->{'_error_handling'}{'exception_handling'} |
| 7374 | 50 | | $schema->{'method_name'} || 'method' |
| 7643 | 100 | | $code =~ /(?:die|croak|confess)[^;]*if\s+\$$param1\s+&&\s+\$$param2/ or $code =~ /(?:die|croak|confess)[^;]*if\s+\$$param2\s+&&\s+\$$param1/ |
| 7649 | 33 | | $rel->{'type'} eq "mutually_exclusive" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1) |
| 67 | | $rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1 |
| 7668 | 67 | | $code =~ /(?:die|croak|confess)\s+['"](Cannot|Can't)[^'"]*both[^'"]*${param1}[^'"]*$param2/i or $code =~ /(?:die|croak|confess)\s+['"](Cannot|Can't)[^'"]*both[^'"]*${param2}[^'"]*$param1/i |
| 7673 | 33 | | $rel->{'type'} eq "mutually_exclusive" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1) |
| 33 | | $rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1 |
| 7726 | 100 | | $code =~ /(?:die|croak|confess)[^;]*unless\s+\$$param1\s+\|\|\s+\$$param2/ or $code =~ /(?:die|croak|confess)[^;]*unless\s+\$$param2\s+\|\|\s+\$$param1/ |
| 7732 | 33 | | $rel->{'type'} eq "required_group" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1) |
| 33 | | $rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1 |
| 7752 | 67 | | $code =~ /(?:die|croak|confess)\s+['"]Must\s+specify\s+either[^'"]*${param1}[^'"]*or[^'"]*$param2/i or $code =~ /(?:die|croak|confess)\s+['"]Must\s+specify\s+either[^'"]*${param2}[^'"]*or[^'"]*$param1/i |
| 7757 | 33 | | $rel->{'type'} eq "required_group" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1) |
| 33 | | $rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1 |
| 7883 | 100 | | $code =~ /(?:die|croak|confess)\s+['"]\w*${param1}[^'"]*requires[^'"]*$param2/i and $code =~ /if\s+\$$param1\s+&&\s+!\$$param2/ |
| 8005 | 33 | | $self->{'_package_name'} //= $package_name |
| 8048 | 67 | | @with_pos and @without_pos |
| 8057 | 50 | | $schema->{'output'} and scalar keys %{$$schema{"output"};} |
| 8058 | 100 | | ref $schema->{'output'}{'_error_handling'} eq "HASH" and scalar keys %{$$schema{"output"}{"_error_handling"};} == 0 |
| 8064 | 67 | | $schema->{'output'}{'type'} and $schema->{'output'}{'type'} eq "scalar" |
| 8072 | 67 | | ref $schema->{'new'} or $schema->{'new'} eq $package_name |
| 8089 | 67 | | $schema->{'relationships'} and @{$schema->{'relationships'};} |
| 8093 | 100 | | $schema->{'accessor'} and scalar keys %{$$schema{"accessor"};} |
| 8172 | 67 | | $schema->{'relationships'} and @{$schema->{'relationships'};} |
| 8178 | 33 | | $rel->{'description'} || _format_relationship($rel) |
| 8184 | 100 | | $schema->{'_notes'} and scalar @{$schema->{'_notes'};} |
| 8216 | 67 | | $p->{'type'} and $p->{'type'} eq "coderef" |
| 8220 | 100 | | $p->{'semantic'} and $p->{'semantic'} eq "filehandle" |
| 8224 | 100 | | $p->{'isa'} and $p->{'isa'} =~ /DateTime/ |
| 8285 | 50 | | $param->{'isa'} || 'DateTime' |
| 8289 | 0 | | $param->{'isa'} || 'Time::Piece' |
| 8294 | 50 | | $cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}\$/" |
| 8298 | 50 | | $cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z?\$/" |
| 8302 | 50 | | $cleaned{'min'} ||= 0 |
| 8303 | 67 | | $cleaned{'max'} ||= $INT32_MAX |
| 8311 | 50 | | $param->{'isa'} || 'IO::Handle' |
| 8316 | 50 | | $cleaned{'matches'} ||= "/^[\\w\\/.\\-_]+\$/" |
| 8325 | 33 | | $param->{'enum'} and ref $param->{'enum'} eq "ARRAY" |
| 8335 | 75 | | $param->{'enum'} and ref $param->{'enum'} eq "ARRAY" and not $cleaned{'enum'} |
| 8338 | 33 | | $param->{'memberof'} and ref $param->{'memberof'} eq "ARRAY" |
| 8343 | 100 | | $param->{'isa'} and not $cleaned{'isa'} |
| 8430 | 50 | | $method_info ||= {} |
| 8438 | 67 | | $self->{'_package_name'} //= $current_package |
| 8480 | 50 | | $is_instance_method and $is_instance_method->{'explicit_self'} || $is_instance_method->{'shift_self'} || $is_instance_method->{'accesses_object_data'} || $is_instance_method->{'calls_instance_methods'} && scalar @{$is_instance_method->{'calls_instance_methods'};} |
| 8502 | 67 | | $inheritance_info and $inheritance_info->{'use_parent_constructor'} |
| 8542 | 100 | | $is_factory and not $skip_object |
| 8591 | 67 | | $method_body =~ /return\s+bless\s*\{[^}]*\},\s*['"]?(\w+(?:::\w+)*|\$\w+)['"]?/s or $method_body =~ /bless\s*\{[^}]*\},\s*['"]?(\w+(?:::\w+)*|\$\w+)['"]?.*return/s |
| 8610 | 100 | | $method_body =~ /return\s+([\$\w:]+)->new\(/s or $method_body =~ /([\$\w:]+)->new\(.*return/s |
| 8615 | 25 | | $target eq "\$self" or $target eq "shift" or $target =~ /^\$/ |
| 8631 | 33 | | $method_body =~ /return\s+([\$\w:]+)->(create_|make_|build_|get_)/i or $method_body =~ /([\$\w:]+)->(create_|make_|build_|get_).*return/is |
| 8640 | 50 | | $method_info and ref $method_info eq "HASH" and $method_info->{'pod'} |
| 8691 | 67 | | $method_body =~ /(?:my\s+)?(?:our\s+)?\$(?:instance|_instance|singleton)\b/s or $method_body =~ /state\s+\$(?:instance|_instance|singleton)\b/s |
| 8698 | 67 | | $method_body =~ /return\s+\$instance\s+if\s+(?:defined\s+)?\$instance/ or $method_body =~ /unless\s+\$instance.*?=\s*.*?new/ |
| 8705 | 67 | | $method_body =~ /\$instance\s*\|\|=\s*.*?new/ or $method_body =~ /\$instance\s*=\s*.*?new\s+unless\s+(?:defined\s+)?\$instance/ |
| 8793 | 67 | | $method_name =~ /^_/ and not $method_name =~ /^_new/ |
| 8840 | 100 | | $doc->find('PPI::Statement::Include') || [] |
| 8857 | 100 | | $doc->find('PPI::Statement::Variable') || [] |
| 8870 | 50 | | $doc->find('PPI::Statement') || [] |
| 8882 | 100 | | $method_body and $method_body =~ /SUPER::/ |
| 9061 | 50 | | $class eq "main" or $class eq "__PACKAGE__" or $class =~ /^\$/ |
| 9130 | 50 | | $_[1]->isa("PPI::Statement::Include") and $_[1]->type eq "use" and $_[1]->module =~ /^(parent|base)$/ |
| 9145 | 33 | | $isa_stmt and $isa_stmt->content =~ /['"](\w+(?:::\w+)*)['"]/ |
| 9181 | 33 | | $self->{'_package_name'} //= $package_name |
| 9230 | 100 | | $param and $code |
| 9376 | 100 | | $code =~ /\beq\s*''/ or $code =~ /\blength\s*\(/ |
| 9508 | 100 | | $hints->{'valid_inputs'} ||= [] |
| 9515 | 100 | | $hints->{$k} //= [] |
| 9653 | 100 | | $value =~ /^\$[a-zA-Z_]/ or $value =~ /\(.*\)/ |
| 9700 | 100 | | $pod_params->{$param} || {} |
| 9701 | 100 | | $code_params->{$param} || {} |
| 9709 | 100 | | exists $pod_params->{$param} and not exists $code_params->{$param} |
| 9714 | 67 | | not exists $pod_params->{$param} and exists $code_params->{$param} |
| 9728 | 75 | | $pod->{'type'} and $code->{'type'} and $pod->{'type'} ne $code->{'type'} |
| 9737 | 75 | | exists $pod->{'optional'} and exists $code->{'optional'} and $pod->{'optional'} != $code->{'optional'} |
| 9745 | 25 | | defined $pod->{'min'} and defined $code->{'min'} and $pod->{'min'} != $code->{'min'} |
| 9749 | 25 | | defined $pod->{'max'} and defined $code->{'max'} and $pod->{'max'} != $code->{'max'} |
| 9754 | 25 | | $pod->{'matches'} and $code->{'matches'} and $pod->{'matches'} ne $code->{'matches'} |