| line | % | coverage | condition |
| 1340 | 50 | | Params::Get::get_params('input_file', @_) || {} |
| 1354 | 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 |
| 1442 | 100 | | Params::Get::get_params(undef, @_) || {} |
| 1453 | 67 | | $self->{'_package_name'} //= $package_name |
| 1503 | 100 | | $document->find('PPI::Statement::Package') || [] |
| 1509 | 67 | | $self->{'_package_name'} //= $pkgs->[0]->namespace |
| 1545 | 100 | | $document->find('PPI::Statement::Sub') || [] |
| 1546 | 100 | | $document->find('PPI::Statement') || [] |
| 1556 | 100 | | $name =~ /^_/ and not $name =~ /^_(new|init|build)/ |
| 1588 | 0 | | $next_sib and not $next_sib->isa("PPI::Statement::Sub") |
| 1592 | 0 | | $next_sib and $next_sib->isa("PPI::Statement::Sub") |
| 1677 | 50 | | $2 || '()' |
| 1680 | 33 | | $method_name =~ /^_/ and not $method_name =~ /^_(new|init|build)/ |
| 1745 | 67 | | $current and $steps++ < $POD_WALK_LIMIT |
| 1746 | 67 | | $current->isa("PPI::Token::Whitespace") or $current->isa("PPI::Token::Separator") |
| 1818 | 67 | | $method->{'fields'} and keys %{$$method{"fields"};} |
| 1841 | 67 | | $self->{'strict_pod'} and $pod |
| 1910 | 100 | | $method->{'name'} ne "new" and $needs_object |
| 1926 | 100 | | $schema->{'_analysis'} ||= {} |
| 1929 | 100 | | $schema->{'_analysis'}{'confidence_factors'} ||= {} |
| 1930 | 100 | | $schema->{'_analysis'}{'confidence_factors'}{'input'} ||= $input_confidence->{'factors'} |
| 1931 | 33 | | $schema->{'_analysis'}{'confidence_factors'}{'output'} ||= $output_confidence->{'factors'} |
| 1955 | 100 | | $input_level //= "none" |
| 1956 | 50 | | $output_level //= "none" |
| 1963 | 67 | | $relationships and @{$relationships;} |
| 1993 | 50 | | $schema->{'_yamltest_hints'} ||= {} |
| 1996 | 50 | | $schema->{'_yamltest_hints'}{'boundary_values'} ||= [] |
| 2010 | 100 | | $schema->{'_yamltest_hints'} ||= {} |
| 2017 | 100 | | $level_rank{$overall} < $level_rank{$LEVEL_MEDIUM} and $level_rank{$overall} < $self->{'confidence_threshold'} * 4 |
| 2104 | 75 | | $schema->{'output'} and $schema->{'output'}{'type'} and $schema->{'output'}{'type'} =~ /^(number|integer)$/ |
| 2109 | 67 | | $p->{'type'} and $p->{'type'} =~ /^(number|integer)$/ |
| 2188 | 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*;/ |
| 2209 | 0 | | $schema->{'input'} ||= {"value", {"type", "string", "optional", 1}} |
| 2275 | 50 | | $schema->{'input'} ||= {"value", {"type", "string", "optional", 1}} |
| 2385 | 50 | | $schema->{'accessor'}{'type'} and $schema->{'accessor'}{'type'} =~ /setter|getset/ and $schema->{'input'} |
| 2389 | 100 | | $in->{'type'} and $in->{'type'} eq "object" |
| 2403 | 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' |
| 2438 | 100 | | $args{'method'} // "UNKNOWN" |
| 2439 | 100 | | $args{'message'} // "Analysis error" |
| 2441 | 100 | | $self->{'_package_name'} // "UNKNOWN" |
| 2442 | 100 | | $self->{'input_file'} // "UNKNOWN" |
| 2482 | 50 | | $res and ref $res eq "HASH" and keys %{{} unless $res->{'input'};} |
| 2516 | 33 | | $child->isa("PPI::Statement") or $child->isa("PPI::Statement::Expression") |
| 2520 | 0 | | $_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator') |
| 2525 | 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") |
| 2534 | 0 | | $key and $val |
| 2538 | 0 | | $inner->isa("PPI::Statement") or $inner->isa("PPI::Statement::Expression") |
| 2541 | 0 | | $_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator') |
| 2545 | 0 | | $k and $v |
| 2551 | 0 | | $keyname =~ /^(min|max)$/ and &looks_like_number($value) |
| 2562 | 0 | | $param{'type'} //= "string" |
| 2563 | 0 | | $param{'optional'} //= 0 |
| 2604 | 67 | | ref $code and $code->can("find") |
| 2606 | 100 | | $self->{'_ppi_cache'} ||= {} |
| 2607 | 67 | | $self->{'_ppi_cache'}{$code} //= "PPI::Document"->new(\$code) |
| 2635 | 100 | | $_[1]->content eq "validate_strict" or $_[1]->content eq "Params::Validate::Strict::validate_strict" |
| 2640 | 67 | | $list and not $list->isa("PPI::Structure::List") |
| 2699 | 100 | | $_[1]->content eq "validate" or $_[1]->content eq "Params::Validate::validate" |
| 2704 | 67 | | $list and not $list->isa("PPI::Structure::List") |
| 2846 | 67 | | $list and not $list->isa("PPI::Structure::List") |
| 2934 | 67 | | $block and $block->can("children") |
| 2938 | 0 | | $result and ref $result eq "HASH" and $result->{'input'} |
| 3284 | 0 | | $stderr and length $stderr |
| 3334 | 100 | | $type_map{$p->{'type'}} // "string" |
| 3353 | 50 | | $type_map{$ret->{'type'}} // "string" |
| 3425 | 33 | | @sig_params and $sig_params[0] =~ /^(self|class)$/i |
| 3429 | 33 | | $params{$param}{'position'} //= $position_counter |
| 3459 | 67 | | $line =~ /^\s*\$(\w+)\s*-\s*(\w+)(?:\s*\(([^)]+)\))?\s*,?\s*(.*)$/i or $line =~ /^\s*C<\$(\w+)>\s*-\s*(\w+)(?:\s*\(([^)]+)\))?\s*,?\s*(.*)$/i |
| 3469 | 100 | | $params{$name} ||= {"_source", "pod"} |
| 3479 | 33 | | $type eq "num" or $type eq "float" |
| 3493 | 100 | | $desc || '' |
| 100 | | $constraint || '' |
| 3510 | 100 | | $desc and $desc =~ m[matches?\s+(/[^/]+/|qr/.+?/)]i |
| 3534 | 50 | | $params{$name} ||= {"_source", "pod"} |
| 3538 | 33 | | $type eq "num" or $type eq "float" |
| 3575 | 33 | | defined $name and length $name |
| 3582 | 100 | | $params{$name} ||= {"_source", "pod"} |
| 3592 | 0 | | $type eq "num" or $type eq "float" |
| 3671 | 50 | | $params{$_}{'position'} // -1 |
| 3690 | 50 | | $params{$name} //= {"_source", "pod"} |
| 3879 | 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 |
| 3900 | 33 | | defined $output->{'type'} and $output->{'type'} eq "scalar" |
| 3903 | 50 | | $output->{'type'} ||= "boolean" |
| 3913 | 50 | | $output->{'type'} ||= "boolean" |
| 3921 | 100 | | not $output->{'type'} and $pod =~ /returns?\s+(?:an?\s+)?(\w+)/i |
| 3932 | 0 | | $type eq 1 or $type eq 0 |
| 3946 | 33 | | not $type and $pod =~ /returns?\s+.+\slist\b/i |
| 4075 | 67 | | $boolean_count >= 2 and $boolean_count >= $total_count * "0.8" |
| 4085 | 100 | | $code =~ /return\s+\$self\s*;/ and $code =~ /\$self\s*->\s*\{[^}]+\}\s*=/ |
| 4090 | 0 | | $self->{'_document'} and my $package_stmt = $self->{'_document'}->find_first("PPI::Statement::Package") |
| 4092 | 0 | | $self->{'_package_name'} //= $output->{'isa'} |
| 4117 | 0 | | $output->{'isa'} || 'UNKNOWN' |
| 4118 | 0 | | $self->{'_package_name'} //= $output->{'isa'} |
| 4131 | 50 | | $output->{'isa'} || 'UNKNOWN' |
| 4132 | 33 | | $self->{'_package_name'} //= $output->{'isa'} |
| 4156 | 100 | | $ret =~ /=/ and $ret =~ /\$\w+/ |
| 100 | | $ret eq 1 or $ret eq 0 |
| 4230 | 67 | | $return_types{'integer'} and not $return_types{'string'} |
| 4231 | 33 | | not $output->{'type'} or $output->{'type'} eq "scalar" |
| 4234 | 50 | | $output->{'_type_confidence'} ||= "low" |
| 4245 | 50 | | $output->{'_type_confidence'} ||= "medium" |
| 4256 | 100 | | @return_statements == 1 and $return_statements[0] eq 1 |
| 4258 | 33 | | not $output->{'type'} or $output->{'type'} eq "scalar" |
| 4300 | 67 | | not $output->{'type'} or $output->{'type'} eq "unknown" |
| 4303 | 67 | | $pod and not $output->{'type'} |
| 4363 | 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" |
| 4364 | 50 | | $output->{'type'} || 'none' |
| 4452 | 67 | | $comma_count > 0 and not $content =~ /\b(?:bless|new)\b/ |
| 4454 | 67 | | $output->{'type'} and $output->{'type'} eq "boolean" |
| 4538 | 100 | | $no_value_returns > 0 and $no_value_returns == $total_returns |
| 75 | | $true_returns > 0 and $true_returns == $total_returns and $total_returns >= 1 |
| 4546 | 100 | | $output->{'type'} and $output->{'type'} eq "boolean" |
| 4590 | 67 | | $self_returns > 0 and $total_returns > 0 |
| 4601 | 33 | | $self->{'_package_name'} //= $output->{'isa'} |
| 4670 | 67 | | $zero_returns > 0 and $one_returns > 0 |
| 4687 | 67 | | /^\s*undef\s*$/ || /^\s*$/ |
| 4689 | 50 | | $has_undef and $has_value and scalar @all_returns >= 2 |
| 4770 | 75 | | $expr =~ /^\@\w+/ or $expr =~ /^qw\(/ or $expr =~ /^\@\{/ |
| 4780 | 100 | | $expr =~ /^\[/ or $expr =~ /^\\\@/ |
| 4785 | 100 | | $expr =~ /^\{/ or $expr =~ /^\\\%/ |
| 4790 | 33 | | $expr =~ /^\%\w+/ or $expr =~ /^\%\{/ |
| 4795 | 67 | | $expr =~ /^['"]/ or $expr =~ /['"]$/ |
| 4850 | 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 |
| 4882 | 100 | | defined $output->{'type'} and $output->{'type'} eq "boolean" and not defined $output->{'value'} |
| 4885 | 50 | | $output->{'value'} and defined $output->{'type'} and $output->{'type'} ne "boolean" |
| 4941 | 67 | | $param->{'type'} and $param->{'type'} eq "integer" |
| 4942 | 67 | | $param->{'type'} and $param->{'type'} eq "number" |
| 5018 | 50 | | $params{$name} //= {"_source", "code", "position", $pos++} |
| 5027 | 100 | | $params{$param}{'_default'} and not $params{$param}{'type'} |
| 5082 | 50 | | $$p->{'type'} //= "number" |
| 5087 | 0 | | $$p->{'type'} //= "number" |
| 5172 | 33 | | $code =~ /\%\{\s*\$$param\s*\}/ or $code =~ /\$$param\s*->\s*\{/ |
| 33 | | $code =~ /\@\{\s*\$$param\s*\}/ or $code =~ /push\s*\(\s*\@?\$$param/ |
| 5180 | 100 | | not $p->{'type'} and exists $p->{'_default'} |
| 5201 | 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*\)/ |
| 5300 | 33 | | defined $param and $param =~ /^\w+$/ |
| 5321 | 33 | | $code =~ /\$$param\s*->\s*isa\s*\(\s*['"]Time::Piece['"]\s*\)/i or $code =~ /\$$param\s*->\s*(strftime|epoch|year|mon|mday)/ |
| 5349 | 50 | | $code =~ /\$$param\s*>\s*\d{9,}/ or $code =~ /time\(\s*\)\s*-\s*\$$param/ or $code =~ /\$$param\s*-\s*time\(\s*\)/ |
| 5360 | 33 | | $code =~ /strptime\s*\(\s*\$$param/ or $code =~ /DateTime::Format::\w+\s*->\s*parse_datetime\s*\(\s*\$$param/ |
| 5393 | 33 | | defined $param and $param =~ /^\w+$/ |
| 5422 | 33 | | $code =~ /File::(?:Spec|Basename)::\w+\s*\(\s*\$$param/ or $code =~ /(?:basename|dirname|fileparse)\s*\(\s*\$$param/ |
| 5432 | 67 | | defined $p->{'_default'} and $p->{'_default'} =~ m[^([A-Za-z]:\\|/|\./|\.\./)] |
| 5440 | 33 | | $code =~ /\$$param\s*->\s*isa\s*\(\s*['"]IO::File['"]\s*\)/ or $code =~ /IO::File\s*->\s*new\s*\(\s*\$$param/ |
| 5473 | 33 | | defined $param and $param =~ /^\w+$/ |
| 5484 | 50 | | $code =~ /\$$param\s*->\s*\(/ or $code =~ /\$$param\s*->\s*\(\s*\@_\s*\)/ or $code =~ /&\s*\{\s*\$$param\s*\}/ |
| 5502 | 33 | | $code =~ /blessed\s*\(\s*\$$param\s*\)/ and $code =~ /ref\s*\(\s*\$$param\s*\)\s*eq\s*['"]CODE['"]/i |
| 5541 | 33 | | defined $param and $param =~ /^\w+$/ |
| 5561 | 67 | | defined $values_str and $code =~ /\$$hash_name\s*\{\s*\$$param\s*\}/ |
| 5617 | 33 | | $code =~ /\$$param\s*~~\s*\[([^\]]+)\]/ or $code =~ /\$$param\s*~~\s*qw\s*[\(\[<{]([^)\]>}]+)[\)\]>}]/ |
| 5676 | 67 | | $1 || $2 |
| 5683 | 100 | | $$p->{'_invalid'} ||= [] |
| 5684 | 100 | | $$p->{'_errors'} ||= [] |
| 5797 | 0 | | $params->{$name} //= {"_source", "code", "optional", 1, "position", $pos++} |
| 5813 | 50 | | $params->{$name} //= {"_source", "code", "optional", 1} |
| 5829 | 33 | | @shifts and $shifts[0] =~ /^(self|class)$/i |
| 5832 | 50 | | $params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++} |
| 5844 | 0 | | $params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++} |
| 6091 | 33 | | $default eq 1 or $default eq 0 |
| 6147 | 67 | | defined $value and $value ne "" |
| 6358 | 50 | | $params->{$param_name} ||= {} |
| 6479 | 50 | | $params->{$param} ||= {} |
| 6515 | 100 | | keys %{$params;} || $code =~ /my\s+\$(?:self|class)\s*=\s*\$_\[0\]/ |
| 6522 | 50 | | $var eq "class" and $position == 0 and $method->{'name'} eq "new" |
| 25 | | $var eq "self" and $position == 0 and $method->{'name'} ne "new" |
| 6529 | 0 | | $params->{$var} ||= {"position", $position++} |
| 6538 | 25 | | $var eq "class" and $position == 0 and $method->{'name'} eq "new" |
| 25 | | $var eq "self" and $position == 0 and $method->{'name'} ne "new" |
| 6545 | 0 | | $params->{$var} ||= {"position", $position++} |
| 6553 | 0 | | $var ne "class" or $position > 0 or $method->{'name'} ne "new" |
| 6554 | 0 | | $params->{$var} ||= {"position", $index} |
| 6625 | 50 | | $p->{'type'} ||= "string" |
| 6639 | 100 | | not $guarded and $code =~ /\$$param\s*([<>]=?)\s*([+-]?(?:\d+\.?\d*|\.\d+))/ |
| 6644 | 33 | | $p->{'type'} ||= &looks_like_number($val) ? "number" : "integer" |
| 6646 | 67 | | $op eq ">" or $op eq ">=" |
| 67 | | $op eq "<" or $op eq "<=" |
| 6649 | 33 | | not defined $p->{'max'} or $max < $p->{'max'} |
| 6652 | 33 | | not defined $p->{'min'} or $min > $p->{'min'} |
| 6659 | 50 | | $p->{'type'} ||= "string" |
| 6709 | 100 | | defined $default_value and not exists $p->{'_default'} |
| 6715 | 0 | | defined $default_value and not ref $default_value |
| 6733 | 100 | | not $default_value || exists $p->{'_default'} and $code =~ /\$$param\s*=\s*([^;{}]+?)(?:\s*[;}])/s |
| 100 | | $default_value || exists $p->{'_default'} |
| 6736 | 33 | | $assignment =~ /\$$param/ or $assignment =~ /^shift/ |
| 6803 | 100 | | $pod->{$param} and defined $pod->{$param}{'position'} |
| 6804 | 33 | | $sig->{$param} and defined $sig->{$param}{'position'} |
| 6805 | 100 | | $code->{$param} and defined $code->{$param}{'position'} |
| 6828 | 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" |
| 6841 | 0 | | $p->{$key} //= $sig->{$param}{$key} |
| 6854 | 50 | | $merged{$b}{'position'} || 999 |
| 50 | | $merged{$a}{'position'} || 999 |
| 6859 | 50 | | $p->{'type'} || 'none' |
| 100 | | $p->{'position'} || 'none' |
| 6957 | 100 | | $p->{'type'} eq "string" and $p->{'min'} || $p->{'max'} || $p->{'matches'} |
| 7154 | 100 | | $output->{'_error_handling'} and $output->{'_error_handling'}{'exception_handling'} |
| 7210 | 50 | | $schema->{'method_name'} || 'method' |
| 7479 | 100 | | $code =~ /(?:die|croak|confess)[^;]*if\s+\$$param1\s+&&\s+\$$param2/ or $code =~ /(?:die|croak|confess)[^;]*if\s+\$$param2\s+&&\s+\$$param1/ |
| 7485 | 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 |
| 7504 | 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 |
| 7509 | 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 |
| 7562 | 100 | | $code =~ /(?:die|croak|confess)[^;]*unless\s+\$$param1\s+\|\|\s+\$$param2/ or $code =~ /(?:die|croak|confess)[^;]*unless\s+\$$param2\s+\|\|\s+\$$param1/ |
| 7568 | 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 |
| 7588 | 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 |
| 7593 | 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 |
| 7719 | 100 | | $code =~ /(?:die|croak|confess)\s+['"]\w*${param1}[^'"]*requires[^'"]*$param2/i and $code =~ /if\s+\$$param1\s+&&\s+!\$$param2/ |
| 7841 | 33 | | $self->{'_package_name'} //= $package_name |
| 7884 | 67 | | @with_pos and @without_pos |
| 7893 | 50 | | $schema->{'output'} and scalar keys %{$$schema{"output"};} |
| 7894 | 100 | | ref $schema->{'output'}{'_error_handling'} eq "HASH" and scalar keys %{$$schema{"output"}{"_error_handling"};} == 0 |
| 7900 | 67 | | $schema->{'output'}{'type'} and $schema->{'output'}{'type'} eq "scalar" |
| 7908 | 67 | | ref $schema->{'new'} or $schema->{'new'} eq $package_name |
| 7925 | 67 | | $schema->{'relationships'} and @{$schema->{'relationships'};} |
| 7929 | 100 | | $schema->{'accessor'} and scalar keys %{$$schema{"accessor"};} |
| 8008 | 67 | | $schema->{'relationships'} and @{$schema->{'relationships'};} |
| 8014 | 33 | | $rel->{'description'} || _format_relationship($rel) |
| 8020 | 100 | | $schema->{'_notes'} and scalar @{$schema->{'_notes'};} |
| 8052 | 67 | | $p->{'type'} and $p->{'type'} eq "coderef" |
| 8056 | 100 | | $p->{'semantic'} and $p->{'semantic'} eq "filehandle" |
| 8060 | 100 | | $p->{'isa'} and $p->{'isa'} =~ /DateTime/ |
| 8121 | 50 | | $param->{'isa'} || 'DateTime' |
| 8125 | 0 | | $param->{'isa'} || 'Time::Piece' |
| 8130 | 50 | | $cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}\$/" |
| 8134 | 50 | | $cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z?\$/" |
| 8138 | 50 | | $cleaned{'min'} ||= 0 |
| 8139 | 67 | | $cleaned{'max'} ||= $INT32_MAX |
| 8147 | 50 | | $param->{'isa'} || 'IO::Handle' |
| 8152 | 50 | | $cleaned{'matches'} ||= "/^[\\w\\/.\\-_]+\$/" |
| 8161 | 33 | | $param->{'enum'} and ref $param->{'enum'} eq "ARRAY" |
| 8171 | 75 | | $param->{'enum'} and ref $param->{'enum'} eq "ARRAY" and not $cleaned{'enum'} |
| 8174 | 33 | | $param->{'memberof'} and ref $param->{'memberof'} eq "ARRAY" |
| 8179 | 100 | | $param->{'isa'} and not $cleaned{'isa'} |
| 8266 | 50 | | $method_info ||= {} |
| 8274 | 67 | | $self->{'_package_name'} //= $current_package |
| 8316 | 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'};} |
| 8338 | 67 | | $inheritance_info and $inheritance_info->{'use_parent_constructor'} |
| 8378 | 100 | | $is_factory and not $skip_object |
| 8427 | 67 | | $method_body =~ /return\s+bless\s*\{[^}]*\},\s*['"]?(\w+(?:::\w+)*|\$\w+)['"]?/s or $method_body =~ /bless\s*\{[^}]*\},\s*['"]?(\w+(?:::\w+)*|\$\w+)['"]?.*return/s |
| 8446 | 100 | | $method_body =~ /return\s+([\$\w:]+)->new\(/s or $method_body =~ /([\$\w:]+)->new\(.*return/s |
| 8451 | 25 | | $target eq "\$self" or $target eq "shift" or $target =~ /^\$/ |
| 8467 | 33 | | $method_body =~ /return\s+([\$\w:]+)->(create_|make_|build_|get_)/i or $method_body =~ /([\$\w:]+)->(create_|make_|build_|get_).*return/is |
| 8476 | 50 | | $method_info and ref $method_info eq "HASH" and $method_info->{'pod'} |
| 8527 | 67 | | $method_body =~ /(?:my\s+)?(?:our\s+)?\$(?:instance|_instance|singleton)\b/s or $method_body =~ /state\s+\$(?:instance|_instance|singleton)\b/s |
| 8534 | 67 | | $method_body =~ /return\s+\$instance\s+if\s+(?:defined\s+)?\$instance/ or $method_body =~ /unless\s+\$instance.*?=\s*.*?new/ |
| 8541 | 67 | | $method_body =~ /\$instance\s*\|\|=\s*.*?new/ or $method_body =~ /\$instance\s*=\s*.*?new\s+unless\s+(?:defined\s+)?\$instance/ |
| 8629 | 67 | | $method_name =~ /^_/ and not $method_name =~ /^_new/ |
| 8676 | 100 | | $doc->find('PPI::Statement::Include') || [] |
| 8693 | 100 | | $doc->find('PPI::Statement::Variable') || [] |
| 8706 | 50 | | $doc->find('PPI::Statement') || [] |
| 8718 | 100 | | $method_body and $method_body =~ /SUPER::/ |
| 8897 | 50 | | $class eq "main" or $class eq "__PACKAGE__" or $class =~ /^\$/ |
| 8966 | 50 | | $_[1]->isa("PPI::Statement::Include") and $_[1]->type eq "use" and $_[1]->module =~ /^(parent|base)$/ |
| 8981 | 33 | | $isa_stmt and $isa_stmt->content =~ /['"](\w+(?:::\w+)*)['"]/ |
| 9017 | 33 | | $self->{'_package_name'} //= $package_name |
| 9066 | 100 | | $param and $code |
| 9212 | 100 | | $code =~ /\beq\s*''/ or $code =~ /\blength\s*\(/ |
| 9330 | 100 | | $hints->{'valid_inputs'} ||= [] |
| 9337 | 100 | | $hints->{$k} //= [] |
| 9475 | 67 | | $value =~ /^\$[a-zA-Z_]/ or $value =~ /\(.*\)/ |
| 9522 | 100 | | $pod_params->{$param} || {} |
| 9523 | 100 | | $code_params->{$param} || {} |
| 9531 | 100 | | exists $pod_params->{$param} and not exists $code_params->{$param} |
| 9536 | 67 | | not exists $pod_params->{$param} and exists $code_params->{$param} |
| 9550 | 75 | | $pod->{'type'} and $code->{'type'} and $pod->{'type'} ne $code->{'type'} |
| 9559 | 50 | | exists $pod->{'optional'} and exists $code->{'optional'} and $pod->{'optional'} != $code->{'optional'} |
| 9567 | 25 | | defined $pod->{'min'} and defined $code->{'min'} and $pod->{'min'} != $code->{'min'} |
| 9571 | 25 | | defined $pod->{'max'} and defined $code->{'max'} and $pod->{'max'} != $code->{'max'} |
| 9576 | 25 | | $pod->{'matches'} and $code->{'matches'} and $pod->{'matches'} ne $code->{'matches'} |