| line | % | coverage | condition |
| 1278 | 50 | | Params::Get::get_params('input_file', @_) || {} |
| 1291 | 67 | | $params->{'max_parameters'} // $DEFAULT_MAX_PARAMETERS |
| 100 | | $params->{'verbose'} // 0 |
| 100 | | $params->{'include_private'} // 0 |
| 67 | | $params->{'confidence_threshold'} // $DEFAULT_CONFIDENCE_THRESH |
| 1379 | 100 | | Params::Get::get_params(undef, @_) || {} |
| 1390 | 67 | | $self->{'_package_name'} //= $package_name |
| 1440 | 100 | | $document->find('PPI::Statement::Package') || [] |
| 1446 | 67 | | $self->{'_package_name'} //= $pkgs->[0]->namespace |
| 1482 | 100 | | $document->find('PPI::Statement::Sub') || [] |
| 1483 | 100 | | $document->find('PPI::Statement') || [] |
| 1492 | 67 | | $name =~ /^_/ and not $name =~ /^_(new|init|build)/ |
| 1524 | 0 | | $next_sib and not $next_sib->isa("PPI::Statement::Sub") |
| 1528 | 0 | | $next_sib and $next_sib->isa("PPI::Statement::Sub") |
| 1600 | 67 | | $depth > 0 and $class_end < length $content |
| 1618 | 50 | | $2 || '()' |
| 1621 | 33 | | $method_name =~ /^_/ and not $method_name =~ /^_(new|init|build)/ |
| 1684 | 67 | | $current and $steps++ < $POD_WALK_LIMIT |
| 1685 | 67 | | $current->isa("PPI::Token::Whitespace") or $current->isa("PPI::Token::Separator") |
| 1756 | 67 | | $method->{'fields'} and keys %{$$method{"fields"};} |
| 1846 | 100 | | $method->{'name'} ne "new" and $needs_object |
| 1862 | 100 | | $schema->{'_analysis'} ||= {} |
| 1865 | 100 | | $schema->{'_analysis'}{'confidence_factors'} ||= {} |
| 1866 | 100 | | $schema->{'_analysis'}{'confidence_factors'}{'input'} ||= $input_confidence->{'factors'} |
| 1867 | 33 | | $schema->{'_analysis'}{'confidence_factors'}{'output'} ||= $output_confidence->{'factors'} |
| 1891 | 100 | | $input_level //= "none" |
| 1892 | 50 | | $output_level //= "none" |
| 1899 | 67 | | $relationships and @{$relationships;} |
| 1929 | 50 | | $schema->{'_yamltest_hints'} ||= {} |
| 1932 | 50 | | $schema->{'_yamltest_hints'}{'boundary_values'} ||= [] |
| 1949 | 100 | | $schema->{'_yamltest_hints'} ||= {} |
| 1956 | 100 | | $level_rank{$overall} < $level_rank{$LEVEL_MEDIUM} and $level_rank{$overall} < $self->{'confidence_threshold'} * 4 |
| 2043 | 75 | | $schema->{'output'} and $schema->{'output'}{'type'} and $schema->{'output'}{'type'} =~ /^(number|integer)$/ |
| 2048 | 67 | | $p->{'type'} and $p->{'type'} =~ /^(number|integer)$/ |
| 2127 | 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*;/ |
| 2148 | 0 | | $schema->{'input'} ||= {"value", {"type", "string", "optional", 1}} |
| 2214 | 50 | | $schema->{'input'} ||= {"value", {"type", "string", "optional", 1}} |
| 2324 | 50 | | $schema->{'accessor'}{'type'} and $schema->{'accessor'}{'type'} =~ /setter|getset/ and $schema->{'input'} |
| 2328 | 100 | | $in->{'type'} and $in->{'type'} eq "object" |
| 2342 | 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' |
| 2377 | 0 | | $args{'method'} // "UNKNOWN" |
| 2378 | 0 | | $args{'message'} // "Analysis error" |
| 2380 | 0 | | $self->{'_package_name'} // "UNKNOWN" |
| 2381 | 0 | | $self->{'input_file'} // "UNKNOWN" |
| 2421 | 50 | | $res and ref $res eq "HASH" and keys %{{} unless $res->{'input'};} |
| 2455 | 33 | | $child->isa("PPI::Statement") or $child->isa("PPI::Statement::Expression") |
| 2459 | 0 | | $_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator') |
| 2464 | 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") |
| 2473 | 0 | | $key and $val |
| 2477 | 0 | | $inner->isa("PPI::Statement") or $inner->isa("PPI::Statement::Expression") |
| 2480 | 0 | | $_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator') |
| 2484 | 0 | | $k and $v |
| 2490 | 0 | | $keyname =~ /^(min|max)$/ and &looks_like_number($value) |
| 2501 | 0 | | $param{'type'} //= "string" |
| 2502 | 0 | | $param{'optional'} //= 0 |
| 2543 | 33 | | ref $code and $code->can("find") |
| 2545 | 100 | | $self->{'_ppi_cache'} ||= {} |
| 2546 | 33 | | $self->{'_ppi_cache'}{$code} //= "PPI::Document"->new(\$code) |
| 2574 | 100 | | $_[1]->content eq "validate_strict" or $_[1]->content eq "Params::Validate::Strict::validate_strict" |
| 2579 | 67 | | $list and not $list->isa("PPI::Structure::List") |
| 2638 | 100 | | $_[1]->content eq "validate" or $_[1]->content eq "Params::Validate::validate" |
| 2643 | 67 | | $list and not $list->isa("PPI::Structure::List") |
| 2724 | 67 | | $char eq "," and $depth == 0 |
| 2778 | 67 | | $list and not $list->isa("PPI::Structure::List") |
| 2866 | 67 | | $block and $block->can("children") |
| 2870 | 0 | | $result and ref $result eq "HASH" and $result->{'input'} |
| 3179 | 0 | | $stderr and length $stderr |
| 3229 | 100 | | $type_map{$p->{'type'}} // "string" |
| 3248 | 50 | | $type_map{$ret->{'type'}} // "string" |
| 3320 | 33 | | @sig_params and $sig_params[0] =~ /^(self|class)$/i |
| 3324 | 33 | | $params{$param}{'position'} //= $position_counter |
| 3354 | 67 | | $line =~ /^\s*\$(\w+)\s*-\s*(\w+)(?:\s*\(([^)]+)\))?\s*,?\s*(.*)$/i or $line =~ /^\s*C<\$(\w+)>\s*-\s*(\w+)(?:\s*\(([^)]+)\))?\s*,?\s*(.*)$/i |
| 3364 | 100 | | $params{$name} ||= {"_source", "pod"} |
| 3374 | 33 | | $type eq "num" or $type eq "float" |
| 3387 | 100 | | $desc || '' |
| 100 | | $constraint || '' |
| 3404 | 100 | | $desc and $desc =~ m[matches?\s+(/[^/]+/|qr/.+?/)]i |
| 3428 | 50 | | $params{$name} ||= {"_source", "pod"} |
| 3432 | 33 | | $type eq "num" or $type eq "float" |
| 3468 | 33 | | defined $name and length $name |
| 3475 | 50 | | $params{$name} ||= {"_source", "pod"} |
| 3485 | 0 | | $type eq "num" or $type eq "float" |
| 3657 | 33 | | defined $output->{'type'} and $output->{'type'} eq "scalar" |
| 3660 | 50 | | $output->{'type'} ||= "boolean" |
| 3670 | 50 | | $output->{'type'} ||= "boolean" |
| 3678 | 100 | | not $output->{'type'} and $pod =~ /returns?\s+(?:an?\s+)?(\w+)/i |
| 3689 | 0 | | $type eq 1 or $type eq 0 |
| 3703 | 33 | | not $type and $pod =~ /returns?\s+.+\slist\b/i |
| 3832 | 67 | | $boolean_count >= 2 and $boolean_count >= $total_count * "0.8" |
| 3842 | 100 | | $code =~ /return\s+\$self\s*;/ and $code =~ /\$self\s*->\s*\{[^}]+\}\s*=/ |
| 3847 | 0 | | $self->{'_document'} and my $package_stmt = $self->{'_document'}->find_first("PPI::Statement::Package") |
| 3849 | 0 | | $self->{'_package_name'} //= $output->{'isa'} |
| 3874 | 0 | | $output->{'isa'} || 'UNKNOWN' |
| 3875 | 0 | | $self->{'_package_name'} //= $output->{'isa'} |
| 3888 | 50 | | $output->{'isa'} || 'UNKNOWN' |
| 3889 | 33 | | $self->{'_package_name'} //= $output->{'isa'} |
| 3913 | 67 | | $ret =~ /=/ and $ret =~ /\$\w+/ |
| 100 | | $ret eq 1 or $ret eq 0 |
| 3987 | 67 | | $return_types{'integer'} and not $return_types{'string'} |
| 3988 | 33 | | not $output->{'type'} or $output->{'type'} eq "scalar" |
| 3991 | 50 | | $output->{'_type_confidence'} ||= "low" |
| 4002 | 50 | | $output->{'_type_confidence'} ||= "medium" |
| 4013 | 100 | | @return_statements == 1 and $return_statements[0] eq 1 |
| 4015 | 33 | | not $output->{'type'} or $output->{'type'} eq "scalar" |
| 4057 | 67 | | not $output->{'type'} or $output->{'type'} eq "unknown" |
| 4060 | 67 | | $pod and not $output->{'type'} |
| 4120 | 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" |
| 4121 | 50 | | $output->{'type'} || 'none' |
| 4197 | 50 | | $char eq "(" or $char eq "[" or $char eq "{" |
| 4198 | 50 | | $char eq ")" or $char eq "]" or $char eq "}" |
| 4199 | 67 | | $char eq "," and $depth == 0 |
| 4202 | 33 | | $comma_count > 0 and not $content =~ /\b(?:bless|new)\b/ |
| 4204 | 67 | | $output->{'type'} and $output->{'type'} eq "boolean" |
| 4288 | 100 | | $no_value_returns > 0 and $no_value_returns == $total_returns |
| 75 | | $true_returns > 0 and $true_returns == $total_returns and $total_returns >= 1 |
| 4296 | 100 | | $output->{'type'} and $output->{'type'} eq "boolean" |
| 4340 | 67 | | $self_returns > 0 and $total_returns > 0 |
| 4351 | 33 | | $self->{'_package_name'} //= $output->{'isa'} |
| 4420 | 67 | | $zero_returns > 0 and $one_returns > 0 |
| 4437 | 67 | | /^\s*undef\s*$/ || /^\s*$/ |
| 4439 | 50 | | $has_undef and $has_value and scalar @all_returns >= 2 |
| 4506 | 100 | | $char eq "," and $depth == 0 |
| 4515 | 75 | | $expr =~ /^\@\w+/ or $expr =~ /^qw\(/ or $expr =~ /^\@\{/ |
| 4525 | 100 | | $expr =~ /^\[/ or $expr =~ /^\\\@/ |
| 4530 | 100 | | $expr =~ /^\{/ or $expr =~ /^\\\%/ |
| 4535 | 33 | | $expr =~ /^\%\w+/ or $expr =~ /^\%\{/ |
| 4540 | 67 | | $expr =~ /^['"]/ or $expr =~ /['"]$/ |
| 4595 | 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 |
| 4627 | 100 | | defined $output->{'type'} and $output->{'type'} eq "boolean" and not defined $output->{'value'} |
| 4630 | 50 | | $output->{'value'} and defined $output->{'type'} and $output->{'type'} ne "boolean" |
| 4686 | 67 | | $param->{'type'} and $param->{'type'} eq "integer" |
| 4687 | 67 | | $param->{'type'} and $param->{'type'} eq "number" |
| 4759 | 100 | | $params{$param}{'_default'} and not $params{$param}{'type'} |
| 4814 | 50 | | $$p->{'type'} //= "number" |
| 4819 | 0 | | $$p->{'type'} //= "number" |
| 4904 | 67 | | $code =~ /\%\{\s*\$$param\s*\}/ or $code =~ /\$$param\s*->\s*\{/ |
| 33 | | $code =~ /\@\{\s*\$$param\s*\}/ or $code =~ /push\s*\(\s*\@?\$$param/ |
| 4912 | 100 | | not $p->{'type'} and exists $p->{'_default'} |
| 4928 | 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*\)/ |
| 5020 | 33 | | defined $param and $param =~ /^\w+$/ |
| 5041 | 33 | | $code =~ /\$$param\s*->\s*isa\s*\(\s*['"]Time::Piece['"]\s*\)/i or $code =~ /\$$param\s*->\s*(strftime|epoch|year|mon|mday)/ |
| 5069 | 50 | | $code =~ /\$$param\s*>\s*\d{9,}/ or $code =~ /time\(\s*\)\s*-\s*\$$param/ or $code =~ /\$$param\s*-\s*time\(\s*\)/ |
| 5080 | 33 | | $code =~ /strptime\s*\(\s*\$$param/ or $code =~ /DateTime::Format::\w+\s*->\s*parse_datetime\s*\(\s*\$$param/ |
| 5113 | 33 | | defined $param and $param =~ /^\w+$/ |
| 5142 | 33 | | $code =~ /File::(?:Spec|Basename)::\w+\s*\(\s*\$$param/ or $code =~ /(?:basename|dirname|fileparse)\s*\(\s*\$$param/ |
| 5152 | 67 | | defined $p->{'_default'} and $p->{'_default'} =~ m[^([A-Za-z]:\\|/|\./|\.\./)] |
| 5160 | 33 | | $code =~ /\$$param\s*->\s*isa\s*\(\s*['"]IO::File['"]\s*\)/ or $code =~ /IO::File\s*->\s*new\s*\(\s*\$$param/ |
| 5193 | 33 | | defined $param and $param =~ /^\w+$/ |
| 5204 | 50 | | $code =~ /\$$param\s*->\s*\(/ or $code =~ /\$$param\s*->\s*\(\s*\@_\s*\)/ or $code =~ /&\s*\{\s*\$$param\s*\}/ |
| 5222 | 33 | | $code =~ /blessed\s*\(\s*\$$param\s*\)/ and $code =~ /ref\s*\(\s*\$$param\s*\)\s*eq\s*['"]CODE['"]/i |
| 5261 | 33 | | defined $param and $param =~ /^\w+$/ |
| 5281 | 67 | | defined $values_str and $code =~ /\$$hash_name\s*\{\s*\$$param\s*\}/ |
| 5337 | 33 | | $code =~ /\$$param\s*~~\s*\[([^\]]+)\]/ or $code =~ /\$$param\s*~~\s*qw\s*[\(\[<{]([^)\]>}]+)[\)\]>}]/ |
| 5396 | 67 | | $1 || $2 |
| 5403 | 100 | | $$p->{'_invalid'} ||= [] |
| 5404 | 100 | | $$p->{'_errors'} ||= [] |
| 5519 | 50 | | $params->{$name} //= {"_source", "code", "optional", 1} |
| 5535 | 33 | | @shifts and $shifts[0] =~ /^(self|class)$/i |
| 5538 | 50 | | $params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++} |
| 5550 | 0 | | $params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++} |
| 5593 | 25 | | $char eq "(" or $char eq "[" or $char eq "{" |
| 25 | | $char eq ")" or $char eq "]" or $char eq "}" |
| 67 | | $char eq "," and $depth == 0 |
| 5791 | 33 | | $default eq 1 or $default eq 0 |
| 5847 | 67 | | defined $value and $value ne "" |
| 6058 | 50 | | $params->{$param_name} ||= {} |
| 6178 | 50 | | $params->{$param} ||= {} |
| 6218 | 50 | | $var eq "class" and $position == 0 and $method->{'name'} eq "new" |
| 25 | | $var eq "self" and $position == 0 and $method->{'name'} ne "new" |
| 6225 | 0 | | $params->{$var} ||= {"position", $position++} |
| 6234 | 25 | | $var eq "class" and $position == 0 and $method->{'name'} eq "new" |
| 25 | | $var eq "self" and $position == 0 and $method->{'name'} ne "new" |
| 6241 | 0 | | $params->{$var} ||= {"position", $position++} |
| 6249 | 25 | | $var ne "class" or $position > 0 or $method->{'name'} ne "new" |
| 6250 | 50 | | $params->{$var} ||= {"position", $index} |
| 6321 | 50 | | $p->{'type'} ||= "string" |
| 6335 | 100 | | not $guarded and $code =~ /\$$param\s*([<>]=?)\s*([+-]?(?:\d+\.?\d*|\.\d+))/ |
| 6340 | 33 | | $p->{'type'} ||= &looks_like_number($val) ? "number" : "integer" |
| 6342 | 67 | | $op eq ">" or $op eq ">=" |
| 67 | | $op eq "<" or $op eq "<=" |
| 6345 | 33 | | not defined $p->{'max'} or $max < $p->{'max'} |
| 6348 | 33 | | not defined $p->{'min'} or $min > $p->{'min'} |
| 6355 | 50 | | $p->{'type'} ||= "string" |
| 6405 | 100 | | defined $default_value and not exists $p->{'_default'} |
| 6411 | 0 | | defined $default_value and not ref $default_value |
| 6429 | 100 | | not $default_value || exists $p->{'_default'} and $code =~ /\$$param\s*=\s*([^;{}]+?)(?:\s*[;}])/s |
| 100 | | $default_value || exists $p->{'_default'} |
| 6432 | 33 | | $assignment =~ /\$$param/ or $assignment =~ /^shift/ |
| 6499 | 100 | | $pod->{$param} and defined $pod->{$param}{'position'} |
| 6500 | 33 | | $sig->{$param} and defined $sig->{$param}{'position'} |
| 6501 | 100 | | $code->{$param} and defined $code->{$param}{'position'} |
| 6524 | 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" |
| 6537 | 0 | | $p->{$key} //= $sig->{$param}{$key} |
| 6550 | 50 | | $merged{$b}{'position'} || 999 |
| 50 | | $merged{$a}{'position'} || 999 |
| 6555 | 50 | | $p->{'type'} || 'none' |
| 100 | | $p->{'position'} || 'none' |
| 6653 | 100 | | $p->{'type'} eq "string" and $p->{'min'} || $p->{'max'} || $p->{'matches'} |
| 6850 | 100 | | $output->{'_error_handling'} and $output->{'_error_handling'}{'exception_handling'} |
| 6906 | 50 | | $schema->{'method_name'} || 'method' |
| 7172 | 100 | | $code =~ /(?:die|croak|confess)[^;]*if\s+\$$param1\s+&&\s+\$$param2/ or $code =~ /(?:die|croak|confess)[^;]*if\s+\$$param2\s+&&\s+\$$param1/ |
| 7178 | 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 |
| 7197 | 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 |
| 7202 | 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 |
| 7255 | 100 | | $code =~ /(?:die|croak|confess)[^;]*unless\s+\$$param1\s+\|\|\s+\$$param2/ or $code =~ /(?:die|croak|confess)[^;]*unless\s+\$$param2\s+\|\|\s+\$$param1/ |
| 7261 | 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 |
| 7281 | 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 |
| 7286 | 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 |
| 7412 | 67 | | $code =~ /(?:die|croak|confess)\s+['"]\w*${param1}[^'"]*requires[^'"]*$param2/i and $code =~ /if\s+\$param1\s+&&\s+!\$param2/ |
| 7534 | 33 | | $self->{'_package_name'} //= $package_name |
| 7575 | 50 | | $schema->{'output'} and scalar keys %{$$schema{"output"};} |
| 7576 | 67 | | ref $schema->{'output'}{'_error_handling'} eq "HASH" and scalar keys %{$$schema{"output"}{"_error_handling"};} == 0 |
| 7582 | 67 | | $schema->{'output'}{'type'} and $schema->{'output'}{'type'} eq "scalar" |
| 7590 | 33 | | ref $schema->{'new'} or $schema->{'new'} eq $package_name |
| 7607 | 67 | | $schema->{'relationships'} and @{$schema->{'relationships'};} |
| 7611 | 100 | | $schema->{'accessor'} and scalar keys %{$$schema{"accessor"};} |
| 7690 | 67 | | $schema->{'relationships'} and @{$schema->{'relationships'};} |
| 7696 | 33 | | $rel->{'description'} || _format_relationship($rel) |
| 7702 | 50 | | $schema->{'_notes'} and scalar @{$schema->{'_notes'};} |
| 7734 | 67 | | $p->{'type'} and $p->{'type'} eq "coderef" |
| 7738 | 100 | | $p->{'semantic'} and $p->{'semantic'} eq "filehandle" |
| 7742 | 100 | | $p->{'isa'} and $p->{'isa'} =~ /DateTime/ |
| 7803 | 50 | | $param->{'isa'} || 'DateTime' |
| 7807 | 0 | | $param->{'isa'} || 'Time::Piece' |
| 7812 | 50 | | $cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}\$/" |
| 7816 | 50 | | $cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z?\$/" |
| 7820 | 50 | | $cleaned{'min'} ||= 0 |
| 7821 | 67 | | $cleaned{'max'} ||= $INT32_MAX |
| 7829 | 50 | | $param->{'isa'} || 'IO::Handle' |
| 7834 | 50 | | $cleaned{'matches'} ||= "/^[\\w\\/.\\-_]+\$/" |
| 7843 | 33 | | $param->{'enum'} and ref $param->{'enum'} eq "ARRAY" |
| 7851 | 67 | | $param->{'enum'} and ref $param->{'enum'} eq "ARRAY" |
| 7854 | 33 | | $param->{'memberof'} and ref $param->{'memberof'} eq "ARRAY" |
| 7859 | 100 | | $param->{'isa'} and not $cleaned{'isa'} |
| 7945 | 50 | | $method_info ||= {} |
| 7953 | 67 | | $self->{'_package_name'} //= $current_package |
| 7995 | 100 | | $is_instance_method and $is_instance_method->{'explicit_self'} || $is_instance_method->{'shift_self'} || $is_instance_method->{'accesses_object_data'} |
| 8015 | 67 | | $inheritance_info and $inheritance_info->{'use_parent_constructor'} |
| 8055 | 100 | | $is_factory and not $skip_object |
| 8104 | 67 | | $method_body =~ /return\s+bless\s*\{[^}]*\},\s*['"]?(\w+(?:::\w+)*|\$\w+)['"]?/s or $method_body =~ /bless\s*\{[^}]*\},\s*['"]?(\w+(?:::\w+)*|\$\w+)['"]?.*return/s |
| 8123 | 100 | | $method_body =~ /return\s+([\$\w:]+)->new\(/s or $method_body =~ /([\$\w:]+)->new\(.*return/s |
| 8128 | 25 | | $target eq "\$self" or $target eq "shift" or $target =~ /^\$/ |
| 8144 | 33 | | $method_body =~ /return\s+([\$\w:]+)->(create_|make_|build_|get_)/i or $method_body =~ /([\$\w:]+)->(create_|make_|build_|get_).*return/is |
| 8153 | 50 | | $method_info and ref $method_info eq "HASH" and $method_info->{'pod'} |
| 8204 | 67 | | $method_body =~ /(?:my\s+)?(?:our\s+)?\$(?:instance|_instance|singleton)\b/s or $method_body =~ /state\s+\$(?:instance|_instance|singleton)\b/s |
| 8211 | 67 | | $method_body =~ /return\s+\$instance\s+if\s+(?:defined\s+)?\$instance/ or $method_body =~ /unless\s+\$instance.*?=\s*.*?new/ |
| 8218 | 67 | | $method_body =~ /\$instance\s*\|\|=\s*.*?new/ or $method_body =~ /\$instance\s*=\s*.*?new\s+unless\s+(?:defined\s+)?\$instance/ |
| 8300 | 67 | | $method_name =~ /^_/ and not $method_name =~ /^_new/ |
| 8347 | 100 | | $doc->find('PPI::Statement::Include') || [] |
| 8364 | 100 | | $doc->find('PPI::Statement::Variable') || [] |
| 8377 | 50 | | $doc->find('PPI::Statement') || [] |
| 8389 | 100 | | $method_body and $method_body =~ /SUPER::/ |
| 8568 | 50 | | $class eq "main" or $class eq "__PACKAGE__" or $class =~ /^\$/ |
| 8633 | 50 | | $_[1]->isa("PPI::Statement::Include") and $_[1]->type eq "use" and $_[1]->module =~ /^(parent|base)$/ |
| 8648 | 33 | | $isa_stmt and $isa_stmt->content =~ /['"](\w+(?:::\w+)*)['"]/ |
| 8684 | 33 | | $self->{'_package_name'} //= $package_name |
| 8733 | 33 | | $param and $code |
| 8879 | 100 | | $code =~ /\beq\s*''/ or $code =~ /\blength\s*\(/ |
| 8997 | 100 | | $hints->{'valid_inputs'} ||= [] |
| 9004 | 100 | | $hints->{$k} //= [] |
| 9142 | 100 | | $value =~ /^\$[a-zA-Z_]/ or $value =~ /\(.*\)/ |
| 9189 | 100 | | $pod_params->{$param} || {} |
| 9190 | 100 | | $code_params->{$param} || {} |
| 9193 | 100 | | exists $pod_params->{$param} and not exists $code_params->{$param} |
| 9198 | 67 | | not exists $pod_params->{$param} and exists $code_params->{$param} |
| 9199 | 67 | | $method_name eq "new" and $param eq "class" |
| 9203 | 67 | | $method_name ne "new" and $param eq "self" |
| 9212 | 75 | | $pod->{'type'} and $code->{'type'} and $pod->{'type'} ne $code->{'type'} |
| 9221 | 50 | | exists $pod->{'optional'} and exists $code->{'optional'} and $pod->{'optional'} != $code->{'optional'} |
| 9229 | 25 | | defined $pod->{'min'} and defined $code->{'min'} and $pod->{'min'} != $code->{'min'} |
| 9233 | 25 | | defined $pod->{'max'} and defined $code->{'max'} and $pod->{'max'} != $code->{'max'} |
| 9238 | 25 | | $pod->{'matches'} and $code->{'matches'} and $pod->{'matches'} ne $code->{'matches'} |