Condition Coverage

File:blib/lib/App/Test/Generator/SchemaExtractor.pm
Coverage:63.8%

line%coveragecondition
138150
Adec
00
11
Params::Get::get_params('input_file', @_) || {}
139550
Adec
00
11
$params->{'allow_signature_exec'} // 0
100
Adec
00
11
$params->{'verbose'} // 0
100
Adec
00
11
$params->{'include_private'} // 0
67
ABdec
000
011
1X1
$params->{'confidence_threshold'} // $DEFAULT_CONFIDENCE_THRESH
67
ABdec
000
011
1X1
$params->{'max_parameters'} // $DEFAULT_MAX_PARAMETERS
1483100
Adec
00
11
Params::Get::get_params(undef, @_) || {}
149667
ABdec
000
011
1X1
$self->{'_package_name'} //= $package_name
154067
ABdec
0X0
100
111
exists $schema->{'new'} and defined $schema->{'new'}
155375
ABCdec
0XX0
10X0
1100
1111
$ctor_body and $schemas{'new'} and my $reason = _constructor_requires_live_objects($ctor_body, $schemas{'new'})
156875
ABCdec
0XX0
10X0
1100
1111
$ctor_body and $schemas{'new'} and my $reason = _constructor_needs_live_dependencies($schemas{'new'})
157333
ABdec
000
011
1X1
$schemas{'new'}{'skip'} //= $reason
158375
ABCdec
0XX0
10X0
1100
1111
$ctor_body and $schemas{'new'} and _constructor_refuses_direct_instantiation($ctor_body, $schemas{'new'})
159033
ABdec
0X0
100
111
exists $schema->{'new'} and defined $schema->{'new'}
160533
ABdec
0X0
100
111
$schema and ref $schema->{'output'} eq "HASH"
160850
Adec
00
11
$method->{'body'} // ""
1622100
ABdec
000
011
1X1
not defined $declared or $declared =~ /[\@%]\w+/
1624100
Adec
00
11
$declared // ""
163350
Adec
00
11
$schema->{'input'} // {}
1636100
ABdec
0X0
100
111
defined $pos and $pos < @prefix
1647100
ABdec
0X0
100
111
$body =~ /\breturn\s*;/ and not $body =~ /\breturn\s+[^\s;]/
50
Adec
00
11
$method->{'pod'} // ""
100
ABdec
0X0
100
111
$body =~ /\breturn\s+\@\{/ and ($method->{'pod'} // "") =~ /\b(?:a\s+)?list\s+of\b|\breturns?\s+a\s+list\b/i
167650
Adec
00
11
$method->{'pod'} // ""
169250
Adec
00
11
$method->{'pod'} // ""
169350
Adec
00
11
$schema->{'skip'} //= "needs a hashref in the shape its POD documents; a generated hash has arbitrary keys"
170050
Adec
00
11
$method->{'pod'} // ""
170150
Adec
00
11
$schema->{'skip'} //= "needs a live database connection, which a fuzzer cannot provide"
1706100
ABdec
0X0
100
111
ref $schema->{'new'} eq "HASH" and %{$schema->{'new'};}
171067
ABdec
000
011
1X1
$body =~ /\$self->\{\s*['"]?${p}['"]?\s*\}->\{/ || $body =~ /my\s+\$(\w+)\s*=\s*\$self->\{\s*['"]?${p}['"]?\s*\}/ && $body =~ /\$$1->\{/
171267
ABdec
0X0
100
111
$reads_keys and $body =~ /\bcroak\b/
1718100
Adec
00
11
$schema->{'input'} // {}
172367
ABdec
000
011
1X1
$body =~ /ref\(\s*\$args\{\s*['"]?${p}['"]?\s*\}\s*\)\s*(?:ne|eq)\s*['"]CODE['"]/ or $body =~ /\$args\{\s*['"]?${p}['"]?\s*\}\s*->\s*\(/
176667
ABdec
000
011
1X1
$prefix =~ /\breturn\b/ || $prefix =~ /\b(?:croak|die|confess)\b[^;]*\bunless\b/
176967
ABdec
0X0
100
111
not $accepts and $prefix =~ /\bif\s*\([^;{}]*$/
1805100
ABdec
0X0
100
111
@accepted and $croaks_about_param
75
ABCdec
0XX0
10X0
1100
1111
defined $pattern and _pattern_is_self_contained($pattern) and $body =~ /\bcroak\b[^;\n]*(?:not a valid|invalid)/i
1823100
ABdec
0X0
100
111
$schemas{'new'} and $schemas{'new'}{'skip'}
182767
ABdec
0X0
100
111
exists $schema->{'new'} and defined $schema->{'new'}
185033
ABdec
0X0
100
111
ref $target_schema->{'output'} eq "HASH" and %{$target_schema->{'output'};}
185550
Adec
00
11
ref $target_schema->{'input'} eq "HASH" and scalar keys %{$$target_schema{"input"};}
185650
Adec
00
11
ref $schema->{'input'} eq "HASH" and scalar keys %{$$schema{"input"};}
187633
ABdec
000
011
1X1
$schemas{$method_name}{'skip'} //= "multi-package file; only the primary package $package_name is extracted"
1954100
Adec
00
11
$document->find('PPI::Statement::Package') || []
195967
ABdec
000
011
1X1
$self->{'_package_name'} //= $pkgs->[0]->namespace
197367
ABdec
0X0
100
111
$pkgs and @$pkgs > 1
198633
ABdec
000
011
1X1
$self->{'_package_name'} // $pkgs->[0]->namespace
2022100
Adec
00
11
$document->find('PPI::Statement::Sub') || []
2023100
Adec
00
11
$document->find('PPI::Statement::Package') || []
203050
Adec
00
11
$document->find(sub {         $_[1]->content =~ /^\s*(?:before|after|around)\b/ if $_[1]->isa('PPI::Statement'); } ) || []
2044100
ABdec
0X0
100
111
$name =~ /^_/ and not $name =~ /^_(new|init|build)/
2063100
ABdec
0X0
100
111
@$pkgs <= 1 and $content =~ /\bclass\b/
20840
ABdec
0X0
100
111
$next_sib and not $next_sib->isa("PPI::Statement::Sub")
20880
ABdec
0X0
100
111
$next_sib and $next_sib->isa("PPI::Statement::Sub")
217350
Adec
00
11
$2 || '()'
217633
ABdec
0X0
100
111
$method_name =~ /^_/ and not $method_name =~ /^_(new|init|build)/
224267
ABdec
0X0
100
111
$current and $steps++ < $POD_WALK_LIMIT
224367
ABdec
000
011
1X1
$current->isa("PPI::Token::Whitespace") or $current->isa("PPI::Token::Separator")
50
ABCdec
0XX0
10X0
1100
1111
$current->isa("PPI::Statement::Variable") and $current->content =~ /\A\s*(?:my|our)\b/ and not $current->content =~ /\bsub\b/
224825
ABCdec
00X0
0100
0111
1XX1
not $skipped_declaration or defined $name and $content =~ /^=head[1-6]\s+\Q$name\E\b/m
228175
ABCdec
0XX0
10X0
1100
1111
$pod and defined $name and $pod =~ /^=head([1-6])\s+\Q$name\E\b/m
228767
ABdec
000
011
1X1
$self->{'_pod_method_names'}{&refaddr($doc)} ||= do {         my %names; my $subs = $doc->find("PPI::Statement::Sub"); foreach my $method (@{[] unless $subs;}) {         my $method_name = eval {         do {         $method->name } }; $names{$method_name} = 1 if defined $method_name; } ; \%names }
230250
ABCdec
00X0
0100
0111
1XX1
$heading_level < $level or $heading_level == $level and $method_names->{$title}
231867
ABdec
0X0
100
111
defined $name and not $pod =~ /^=head[1-6]\s+\Q$name\E\b/m
232067
ABdec
0X0
100
111
defined $named and length $named
238050
Adec
00
11
$heads[$i][2] // ""
75
ABCdec
00X0
0100
0111
1XX1
($heads[$i][2] // "") =~ /\A\Q$name\E\b/ or defined $synopsis and $synopsis =~ /^\s*\Q$name\E\s*\(/m
2412100
ABdec
0X0
100
111
defined $pod and length $pod
241567
ABdec
0X0
100
111
defined $section and length $section
247167
ABdec
0X0
100
111
$method->{'fields'} and keys %{$$method{"fields"};}
2503100
ABdec
0X0
100
111
$self->{'strict_pod'} and $pod
254650
Adec
00
11
$pod_params->{$name}{'_source'} // ""
254850
Adec
00
11
$schema->{'input'}{$name} //= {}
257150
Adec
00
11
$schema->{'input'}{$_}{'_source'} //= "validator"
2607100
ABdec
0X0
100
111
$method->{'name'} ne "new" and $needs_object
2623100
Adec
00
11
$schema->{'_analysis'} ||= {}
2626100
Adec
00
11
$schema->{'_analysis'}{'confidence_factors'} ||= {}
2627100
ABdec
000
011
1X1
$schema->{'_analysis'}{'confidence_factors'}{'input'} ||= $input_confidence->{'factors'}
262833
ABdec
000
011
1X1
$schema->{'_analysis'}{'confidence_factors'}{'output'} ||= $output_confidence->{'factors'}
2652100
Adec
00
11
$input_level //= "none"
265350
Adec
00
11
$output_level //= "none"
266067
ABdec
0X0
100
111
$relationships and @{$relationships;}
269050
Adec
00
11
$schema->{'_yamltest_hints'} ||= {}
269350
Adec
00
11
$schema->{'_yamltest_hints'}{'boundary_values'} ||= []
2707100
Adec
00
11
$schema->{'_yamltest_hints'} ||= {}
2714100
ABdec
0X0
100
111
$level_rank{$overall} < $level_rank{$LEVEL_MEDIUM} and $level_rank{$overall} < $self->{'confidence_threshold'} * 4
280975
ABCdec
0XX0
10X0
1100
1111
$schema->{'output'} and $schema->{'output'}{'type'} and $schema->{'output'}{'type'} =~ /^(number|integer)$/
281467
ABdec
0X0
100
111
$p->{'type'} and $p->{'type'} =~ /^(number|integer)$/
288150
Adec
00
11
$method->{'name'} // ""
2932100
ABdec
000
011
1X1
$arg_guard || $conditional_arg
75
ABCdec
0XX0
10X0
1100
1111
$arg_guard || $conditional_arg and $code =~ /\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*=\s*(?:shift|\@_|\$_\[\d+\]|\$\w+)\b/x and $code =~ /return\b/
100
ABdec
0X0
100
111
$code =~ /return\s+\$self\b/ and $code =~ /\$self\s*->\s*\{\s*['"]?([^}'"]+)['"]?\s*\}\s*=\s*\$(\w+)\s*;/
50
ABCdec
0XX0
10X0
1100
1111
$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*\@_/
29530
Adec
00
11
$schema->{'input'} ||= {"value", {"type", "string", "optional", 1}}
299240
ABCDdec
0XXX0
10XX0
110X0
11100
11111
$conditional_arg and not $arg_guard and ref $schema->{'input'} eq "HASH" and scalar keys %{$$schema{"input"};} > 1
302850
Adec
00
11
$schema->{'input'} ||= {"value", {"type", "string", "optional", 1}}
310450
Adec
00
11
$schema->{'output'} ||= {}
317750
ABCdec
0XX0
10X0
1100
1111
$schema->{'accessor'}{'type'} and $schema->{'accessor'}{'type'} =~ /setter|getset/ and $schema->{'input'}
3181100
ABdec
0X0
100
111
$in->{'type'} and $in->{'type'} eq "object"
319567
ABCDEdec
0XXXX0
10XXX0
110XX0
111000
111011
1111X1
$schema->{'accessor'}{'type'} and $schema->{'accessor'}{'property'} and $schema->{'accessor'}{'type'} =~ /getter|getset/ and !defined($schema->{'output'}{'type'}) || $schema->{'output'}{'type'} eq 'string'
3230100
Adec
00
11
$args{'method'} // "UNKNOWN"
3231100
Adec
00
11
$args{'message'} // "Analysis error"
3233100
Adec
00
11
$self->{'_package_name'} // "UNKNOWN"
3234100
Adec
00
11
$self->{'input_file'} // "UNKNOWN"
327450
ABCdec
0XX0
10X0
1100
1111
$res and ref $res eq "HASH" and keys %{{} unless $res->{'input'};}
330833
ABdec
000
011
1X1
$child->isa("PPI::Statement") or $child->isa("PPI::Statement::Expression")
33120
ABdec
000
011
1X1
$_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator')
33170
ABCdec
00X0
0100
0111
1X00
1X11
$tokens[$i]->isa('PPI::Token::Word') || $tokens[$i]->isa('PPI::Token::Quote') and $tokens[$i + 1]->isa("PPI::Structure::Constructor")
33260
ABdec
0X0
100
111
$key and $val
33300
ABdec
000
011
1X1
$inner->isa("PPI::Statement") or $inner->isa("PPI::Statement::Expression")
33330
ABdec
000
011
1X1
$_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator')
33370
ABdec
0X0
100
111
$k and $v
33430
ABdec
0X0
100
111
$keyname =~ /^(min|max)$/ and &looks_like_number($value)
33540
Adec
00
11
$param{'type'} //= "string"
33550
Adec
00
11
$param{'optional'} //= 0
339667
ABdec
0X0
100
111
ref $code and $code->can("find")
3398100
Adec
00
11
$self->{'_ppi_cache'} ||= {}
339967
ABdec
000
011
1X1
$self->{'_ppi_cache'}{$code} //= "PPI::Document"->new(\$code)
3427100
ABdec
000
011
1X1
$_[1]->content eq "validate_strict" or $_[1]->content eq "Params::Validate::Strict::validate_strict"
343267
ABdec
0X0
100
111
$list and not $list->isa("PPI::Structure::List")
3492100
ABdec
000
011
1X1
$_[1]->content eq "validate" or $_[1]->content eq "Params::Validate::validate"
349767
ABdec
0X0
100
111
$list and not $list->isa("PPI::Structure::List")
350433
ABdec
0X0
100
111
$schema_text and not $schema_text =~ /$UNSAFE_KEYWORD_RE/
363967
ABdec
0X0
100
111
$list and not $list->isa("PPI::Structure::List")
364633
ABdec
0X0
100
111
$schema_text and not $schema_text =~ /$UNSAFE_KEYWORD_RE/
372767
ABdec
0X0
100
111
$block and $block->can("children")
37310
ABCdec
0XX0
10X0
1100
1111
$result and ref $result eq "HASH" and $result->{'input'}
402933
ABdec
000
011
1X1
$signature_expr =~ /$UNSAFE_KEYWORD_RE/ or $signature_expr =~ /$UNSAFE_CHAR_RE/
413767
ABdec
0X0
100
111
$stderr and length $stderr
414567
ABdec
0X0
100
111
defined $stdout and length $stdout
4201100
Adec
00
11
$type_map{$p->{'type'}} // "string"
422050
Adec
00
11
$type_map{$ret->{'type'}} // "string"
429233
ABdec
0X0
100
111
@sig_params and $sig_params[0] =~ /^(self|class|pkg|proto|klass)$/i
429633
ABdec
000
011
1X1
$params{$param}{'position'} //= $position_counter
4326100
ABdec
000
011
1X1
$line =~ /^\s*\$(\w+)\s*-\s*(\w+)(?:\s*\(([^)]+)\))?\s*,?\s*(.*)$/i or $line =~ /^\s*C<\$(\w+)>\s*-\s*(\w+)(?:\s*\(([^)]+)\))?\s*,?\s*(.*)$/i
4336100
Adec
00
11
$params{$name} ||= {"_source", "pod"}
434633
ABdec
000
011
1X1
$type eq "num" or $type eq "float"
4360100
Adec
00
11
$desc || ''
100
Adec
00
11
$constraint || ''
4377100
ABdec
0X0
100
111
$desc and $desc =~ m[matches?\s+(/[^/]+/|qr/.+?/)]i
440850
Adec
00
11
$params{$name} ||= {"_source", "pod"}
441233
ABdec
000
011
1X1
$type eq "num" or $type eq "float"
447533
ABdec
0X0
100
111
defined $name and length $name
4482100
Adec
00
11
$params{$name} ||= {"_source", "pod"}
449233
ABdec
000
011
1X1
$type eq "num" or $type eq "float"
459050
Adec
00
11
$params{$_}{'position'} // -1
4609100
Adec
00
11
$params{$name} //= {"_source", "input_spec"}
4640100
ABdec
000
011
1X1
exists $params{$name}{'min'} or exists $params{$name}{'max'}
467650
Adec
00
11
$params{$bare_name} //= {"_source", "input_spec"}
468250
Adec
00
11
$bare_type // ""
469633
ABdec
000
011
1X1
$1 // $2
479567
ABdec
0X0
100
111
defined $pod and length $pod
485567
ABdec
0X0
100
111
$node and $node->can("tokens")
496867
ABdec
0X0
100
111
defined $type and length $type
496950
ABCdec
0XX0
10X0
1100
1111
defined $desc and not ref $desc and length $desc
4971100
ABdec
0X0
100
111
$type eq "arrayref" and $desc =~ /\bof\s+\{([^}]+)\}/i
4987100
ABdec
0X0
100
111
$type eq "arrayref" and $desc =~ /\bhashrefs?\b/i
4991100
ABdec
0X0
100
111
$type eq "hashref" and $desc =~ /=>\s*\w+\s+hashref\b/i
5050100
Adec
00
11
$params->{$name} //= {}
506033
ABdec
0X0
100
111
defined $fields->{'isa'} and not $fields->{'isa'} =~ /\Aundef\z/i
506433
ABdec
0X0
100
111
ref $fields->{'enum'} eq "ARRAY" and @{$fields->{'enum'};}
506667
ABdec
0X0
100
111
defined $fields->{'min'} and $fields->{'min'} =~ /\A-?\d/
506867
ABdec
0X0
100
111
defined $fields->{'max'} and $fields->{'max'} =~ /\A-?\d/
513033
ABdec
0X0
100
111
defined $first and exists $types{lc $first}
514675
ABCdec
0XX0
10X0
1100
1111
defined $routine and defined $row_routine and $row_routine ne $routine
516067
ABdec
0X0
100
111
not defined $type and defined $type_word
516333
ABdec
0X0
100
111
not defined $type and $prose
5170100
Adec
00
11
$params->{$name} //= {}
518267
ABdec
000
011
1X1
$spec =~ /\boptional\b/i or $spec =~ /\bdefault\b/i
5193100
ABCdec
0XX0
10X0
1100
1111
defined $type and $type eq "arrayref" and $spec =~ /\b(?:one\s+or\s+more|at\s+least\s+one|non-empty)\b/i
5200100
ABCdec
0XX0
10X0
1100
1111
defined $type and $type eq "string" and $spec =~ /\b(?:readable|existing)\b[^;:]*\bfile\b/i
520780
ABCDdec
0XXX0
10XX0
110X0
11100
11111
defined $type and $type eq "string" and $spec =~ /\bdir(?:ectory)?\b/i and $spec =~ /\b(?:existing|readable|writable)\b/i
521567
ABdec
000
011
1X1
$name =~ /\A(?:bytes|blob)\z/i or $spec =~ /\braw\s+bytes\b|file'?s\s+contents|\bbinary\s+(?:data|contents)\b/i
521850
Adec
00
11
$p->{'type'} //= "string"
5243100
ABCdec
0XX0
10X0
1100
1111
defined $type and $type =~ /\A(?:integer|number)\z/ and $spec =~ /\bdefault\b\s*\(?\s*(-?\d[\d_]*)/i
525050
ABCDEdec
0XXXX0
10XXX0
110XX0
111000
111011
1111X1
defined $p->{'max'} and $default > 0 and $p->{'max'} >= 10 * $default and !defined($p->{'min'}) || $default >= $p->{'min'}
53020
Adec
00
11
$p->{'_source'} // ""
53030
Adec
00
11
$p->{'type'} // ""
53050
ABdec
0X0
100
111
defined $row_text{$name} and $row_text{$name} =~ /arrayref\s+of\s+\Q$kind\E\s+hashrefs/i
53190
Adec
00
11
$p->{'_source'} // ""
53210
ABdec
0X0
100
111
defined $p->{'optional'} and not $p->{'optional'}
53230
Adec
00
11
$p->{'type'} // ""
53240
ABCdec
0000
0011
01X1
1XX1
$type eq "arrayref" or $type eq "array" or $type eq "hashref"
53260
ABdec
0X0
100
111
ref $p->{'memberof'} eq "ARRAY" and @{$p->{'memberof'};}
542633
ABdec
0X0
100
111
$block =~ /^\{[^}]*\}/ and $block =~ /=>/
542850
ABCdec
0000
0011
01X1
1XX1
$type eq "scalar" or $type eq "scalarref" or $type eq "str"
543033
ABdec
000
011
1X1
$type eq "float" or $type eq "num"
547133
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\bundef\b/i
67
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(string|text)\b/i
67
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(integer|int|count)\b/i
33
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(float|decimal|number)\b/i
67
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(boolean|true|false)\b/i
33
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(array|list)\b/i
33
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(hash|hashref|dictionary)\b/i
67
ABdec
0X0
100
111
not $output->{'type'} and $returns_desc =~ /\b(object|instance)\b/i
549233
ABdec
0X0
100
111
defined $output->{'type'} and $output->{'type'} eq "scalar"
549550
Adec
00
11
$output->{'type'} ||= "boolean"
550550
Adec
00
11
$output->{'type'} ||= "boolean"
5513100
ABdec
0X0
100
111
not $output->{'type'} and $pod =~ /returns?\s+(?:an?\s+)?(\w+)/i
55240
ABdec
000
011
1X1
$type eq 1 or $type eq 0
553833
ABdec
0X0
100
111
not $type and $pod =~ /returns?\s+.+\slist\b/i
5667100
ABdec
0X0
100
111
$boolean_count >= 2 and $boolean_count >= $total_count * "0.8"
5677100
ABdec
0X0
100
111
$code =~ /return\s+\$self\s*;/ and $code =~ /\$self\s*->\s*\{[^}]+\}\s*=/
568233
ABdec
0X0
100
111
$self->{'_document'} and my $package_stmt = $self->{'_document'}->find_first("PPI::Statement::Package")
568433
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
57090
Adec
00
11
$output->{'isa'} || 'UNKNOWN'
57100
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
572350
Adec
00
11
$output->{'isa'} || 'UNKNOWN'
572433
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
5755100
ABdec
0X0
100
111
$ops_ret =~ /=/ and $ops_ret =~ /\$\w+/
100
ABdec
000
011
1X1
$ret eq 1 or $ret eq 0
587067
ABdec
0X0
100
111
$return_types{'integer'} and not $return_types{'string'}
587167
ABdec
000
011
1X1
not $output->{'type'} or $output->{'type'} eq "scalar"
587450
Adec
00
11
$output->{'_type_confidence'} ||= "low"
588550
Adec
00
11
$output->{'_type_confidence'} ||= "medium"
589467
ABdec
0X0
100
111
$time_list and ($output->{'type'} // "") eq "array"
50
Adec
00
11
$output->{'type'} // ""
5903100
ABdec
0X0
100
111
@return_statements == 1 and $return_statements[0] eq 1
590533
ABdec
000
011
1X1
not $output->{'type'} or $output->{'type'} eq "scalar"
594767
ABdec
000
011
1X1
not $output->{'type'} or $output->{'type'} eq "unknown"
595067
ABdec
0X0
100
111
$pod and not $output->{'type'}
601020
ABCDdec
00000
00011
001X1
01XX1
1XXX1
not $output->{'type'} or $output->{'type'} eq "scalar" or $output->{'type'} eq "array" or $output->{'type'} eq "undef"
601150
Adec
00
11
$output->{'type'} || 'none'
609967
ABdec
0X0
100
111
$comma_count > 0 and not $content =~ /\b(?:bless|new)\b/
610167
ABdec
0X0
100
111
$output->{'type'} and $output->{'type'} eq "boolean"
6209100
ABdec
0X0
100
111
$no_value_returns > 0 and $no_value_returns == $total_returns
75
ABCdec
0XX0
10X0
1100
1111
$true_returns > 0 and $true_returns == $total_returns and $total_returns >= 1
6217100
ABdec
0X0
100
111
$output->{'type'} and $output->{'type'} eq "boolean"
626167
ABdec
0X0
100
111
$self_returns > 0 and $total_returns > 0
627233
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
6341100
ABdec
0X0
100
111
$zero_returns > 0 and $one_returns > 0
635867
ABdec
000
011
1X1
/^\s*undef\s*$/ || /^\s*$/
636050
ABCdec
0XX0
10X0
1100
1111
$has_undef and $has_value and scalar @all_returns >= 2
644175
ABCdec
0000
0011
01X1
1XX1
$expr =~ /^\@\w+/ or $expr =~ /^qw\(/ or $expr =~ /^\@\{/
6451100
ABdec
000
011
1X1
$expr =~ /^\[/ or $expr =~ /^\\\@/
6456100
ABdec
000
011
1X1
$expr =~ /^\{/ or $expr =~ /^\\\%/
646133
ABdec
000
011
1X1
$expr =~ /^\%\w+/ or $expr =~ /^\%\{/
646667
ABdec
000
011
1X1
$expr =~ /^['"]/ or $expr =~ /['"]$/
652180
ABCDdec
00000
00011
001X1
01XX1
1XXX1
$pod =~ /returns?\s+(?:\$)?self\b/i or $pod =~ /chainable/i or $pod =~ /fluent\s+interface/i or $pod =~ /method\s+chaining/i
6553100
ABCdec
0XX0
10X0
1100
1111
defined $output->{'type'} and $output->{'type'} eq "boolean" and not defined $output->{'value'}
655650
ABCdec
0XX0
10X0
1100
1111
$output->{'value'} and defined $output->{'type'} and $output->{'type'} ne "boolean"
658967
ABdec
0X0
100
111
defined $text and length $text
661467
ABdec
000
011
1X1
@values < 2 or @values > 20
667567
ABdec
0X0
100
111
$param->{'type'} and $param->{'type'} eq "integer"
667667
ABdec
0X0
100
111
$param->{'type'} and $param->{'type'} eq "number"
670675
ABCdec
0000
0011
01X1
1XX1
defined $param->{'min'} or defined $param->{'max'} or $param->{'memberof'}
676350
Adec
00
11
$params{$name} //= {"_source", "code", "position", $pos++}
6772100
ABdec
0X0
100
111
$params{$param}{'_default'} and not $params{$param}{'type'}
6827100
Adec
00
11
$$p->{'type'} //= "number"
68320
Adec
00
11
$$p->{'type'} //= "number"
6918100
ABdec
000
011
1X1
$code =~ /\%\{\s*\$$param\s*\}/ or $code =~ /\$$param\s*->\s*\{/
67
ABdec
000
011
1X1
$code =~ /\@\{\s*\$$param\s*\}/ or $code =~ /push\s*\(\s*\@?\$$param/
6930100
ABdec
0X0
100
111
not $p->{'type'} and $code =~ /\$$param\s*->\s*[A-Za-z_]\w*/
6940100
ABdec
0X0
100
111
not $p->{'type'} and exists $p->{'_default'}
6964100
ABdec
000
011
1X1
$ops_code =~ /\$$param\s*(?:==|!=|<=|>=|<|>)/ or $ops_code =~ /(?:==|!=|<=|>=|<|>)\s*\$$param/
60
ABCDdec
00000
00011
001X1
01XX1
1XXX1
$ops_code =~ m[\$$param\s*(?:[\+\*\%]|-(?!>|[A-Za-z]\b)|(?<!/)/(?!/))] or $ops_code =~ m[(?:[\+\*\%]|-(?!>|[A-Za-z]\b)|(?<!/)/(?!/))\s*\$$param] or $ops_code =~ /\bint\s*\(\s*\$$param\s*\)/ or $ops_code =~ /\babs\s*\(\s*\$$param\s*\)/
706533
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
708633
ABdec
000
011
1X1
$code =~ /\$$param\s*->\s*isa\s*\(\s*['"]Time::Piece['"]\s*\)/i or $code =~ /\$$param\s*->\s*(strftime|epoch|year|mon|mday)/
711850
ABCdec
0000
0011
01X1
1XX1
$code =~ /\$$param\s*>\s*\d{9,}/ or $code =~ /time\(\s*\)\s*-\s*\$$param/ or $code =~ /\$$param\s*-\s*time\(\s*\)/
712933
ABdec
000
011
1X1
$code =~ /strptime\s*\(\s*\$$param/ or $code =~ /DateTime::Format::\w+\s*->\s*parse_datetime\s*\(\s*\$$param/
715775
ABCdec
0XX0
10X0
1100
1111
defined $regex and $regex =~ /[Tt]/ and $regex =~ /[Zz]/
719033
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
722833
ABdec
000
011
1X1
$code =~ /File::(?:Spec|Basename)::\w+\s*\(\s*\$$param/ or $code =~ /(?:basename|dirname|fileparse)\s*\(\s*\$$param/
723867
ABdec
0X0
100
111
defined $p->{'_default'} and $p->{'_default'} =~ m[^([A-Za-z]:\\|/|\./|\.\./)]
724633
ABdec
000
011
1X1
$code =~ /\$$param\s*->\s*isa\s*\(\s*['"]IO::File['"]\s*\)/ or $code =~ /IO::File\s*->\s*new\s*\(\s*\$$param/
727933
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
728267
ABdec
000
011
1X1
$code =~ /ref\s*\(\s*\$$param\s*\)\s*eq\s*['"]CODE['"]/i or $code =~ /ref\s*\(\s*\$args\{\s*['"]?${param}['"]?\s*\}\s*\)\s*eq\s*['"]CODE['"]/i
729150
ABCdec
0000
0011
01X1
1XX1
$code =~ /\$$param\s*->\s*\(/ or $code =~ /\$$param\s*->\s*\(\s*\@_\s*\)/ or $code =~ /&\s*\{\s*\$$param\s*\}/
730933
ABdec
0X0
100
111
$code =~ /blessed\s*\(\s*\$$param\s*\)/ and $code =~ /ref\s*\(\s*\$$param\s*\)\s*eq\s*['"]CODE['"]/i
734833
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
736867
ABdec
0X0
100
111
defined $values_str and $code =~ /\$$hash_name\s*\{\s*\$$param\s*\}/
742433
ABdec
000
011
1X1
$code =~ /\$$param\s*~~\s*\[([^\]]+)\]/ or $code =~ /\$$param\s*~~\s*qw\s*[\(\[<{]([^)\]>}]+)[\)\]>}]/
748367
ABdec
000
011
1X1
$1 || $2
7490100
Adec
00
11
$$p->{'_invalid'} ||= []
7491100
Adec
00
11
$$p->{'_errors'} ||= []
760450
Adec
00
11
$params->{$name} //= {"_source", "code", "optional", 1, "position", $pos++}
762050
Adec
00
11
$params->{$name} //= {"_source", "code", "optional", 1}
763633
ABdec
0X0
100
111
@shifts and $shifts[0] =~ /^(self|class|pkg|proto|klass)$/i
763950
Adec
00
11
$params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++}
76510
Adec
00
11
$params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++}
789833
ABdec
000
011
1X1
$default eq 1 or $default eq 0
795467
ABdec
0X0
100
111
defined $value and $value ne ""
816550
Adec
00
11
$params->{$param_name} ||= {}
828650
Adec
00
11
$params->{$param} ||= {}
8322100
ABdec
000
011
1X1
keys %{$params;} || $code =~ /my\s+\$(?:self|class|pkg|proto|klass)\s*=\s*\$_\[0\]/
832933
ABdec
0X0
100
111
$position == 0 and $var =~ /^(self|class|pkg|proto|klass)$/i
83330
Adec
00
11
$params->{$var} ||= {"position", $position++}
834267
ABdec
0X0
100
111
$position == 0 and $var =~ /^(self|class|pkg|proto|klass)$/i
834650
Adec
00
11
$params->{$var} ||= {"position", $position++}
83540
ABdec
000
011
1X1
$index > 0 or not $var =~ /^(self|class|pkg|proto|klass)$/i
83550
Adec
00
11
$params->{$var} ||= {"position", $index}
84090
ABdec
000
011
1X1
not defined $p->{'max'} or $max < $p->{'max'}
841133
ABdec
000
011
1X1
not defined $p->{'max'} or $val < $p->{'max'}
84140
ABdec
000
011
1X1
not defined $p->{'min'} or $min > $p->{'min'}
841667
ABdec
000
011
1X1
not defined $p->{'min'} or $val > $p->{'min'}
84490
ABdec
0X0
100
111
$balanced and $depth == 0
855150
Adec
00
11
$p->{'type'} ||= "string"
8573100
ABdec
0X0
100
111
not $guarded and $code =~ /\$$param\s*([<>]=?)\s*([+-]?(?:\d+\.?\d*|\.\d+))/
857833
ABdec
000
011
1X1
$p->{'type'} ||= &looks_like_number($val) ? "number" : "integer"
858067
ABdec
000
011
1X1
$op eq ">" or $op eq ">="
67
ABdec
000
011
1X1
$op eq "<" or $op eq "<="
858333
ABdec
000
011
1X1
not defined $p->{'max'} or $max < $p->{'max'}
858633
ABdec
000
011
1X1
not defined $p->{'min'} or $min > $p->{'min'}
859350
Adec
00
11
$p->{'type'} ||= "string"
863133
ABdec
0X0
100
111
defined $pattern and length $pattern
8685100
ABdec
0X0
100
111
defined $default_value and not exists $p->{'_default'}
86910
ABdec
0X0
100
111
defined $default_value and not ref $default_value
8709100
ABdec
0X0
100
111
not $default_value || exists $p->{'_default'} and $code =~ /\$$param\s*=\s*([^;{}]+?)(?:\s*[;}])/s
100
ABdec
000
011
1X1
$default_value || exists $p->{'_default'}
8712100
ABdec
000
011
1X1
$assignment =~ /\$$param/ or $assignment =~ /^shift/
8727100
ABdec
0X0
100
111
not $is_required and $code =~ /\b(?:if|unless)\s*\(\s*\$$param\s*\)/
8766100
Adec
00
11
$pod->{$_}{'_source'} // ""
888367
ABdec
000
011
1X1
ref $name || $name =~ /\A(?:HASH|ARRAY|SCALAR|CODE|GLOB|REF|REGEXP|Regexp|LVALUE|VSTRING|FORMAT|IO)\(0x[0-9a-fA-F]+\)\z/ || $name =~ /\s/
890933
ABdec
0X0
100
111
ref $pod eq "HASH" and ref $code eq "HASH"
8917100
ABdec
0X0
100
111
not exists $code->{$_} and defined $pod->{$_}{'position'}
8938100
ABdec
0X0
100
111
$pod->{$param} and defined $pod->{$param}{'position'}
893933
ABdec
0X0
100
111
$sig->{$param} and defined $sig->{$param}{'position'}
8940100
ABdec
0X0
100
111
$code->{$param} and defined $code->{$param}{'position'}
8953100
Adec
00
11
$p->{'_source'} //= "pod"
8957100
Adec
00
11
$pod->{$param}{'_source'} // "pod"
895967
ABdec
0X0
100
111
exists $pod->{$param}{$key} and defined $pod->{$param}{$key}
896033
ABdec
000
011
1X1
$p->{'_constraint_source'}{$key} //= $source
8978100
Adec
00
11
$code->{$param}{'_type_confidence'} // ""
897986
ABCDEFdec
00XXXX0
010XXX0
0110XX0
01110X0
0111100
0111111
1XXXXX1
not exists $p->{$key} or $key eq "type" and $from_pod and $p->{'type'} eq "string" and $code->{$param}{$key} ne "string" and not $heuristic_type
8986100
ABdec
000
011
1X1
$p->{'_source'} //= $code->{$param}{'_source'}
89980
ABdec
000
011
1X1
$p->{'_source'} //= $sig->{$param}{'_source'}
901150
Adec
00
11
$merged{$b}{'position'} || 999
50
Adec
00
11
$merged{$a}{'position'} || 999
901650
Adec
00
11
$p->{'type'} || 'none'
9114100
ABCdec
0XX0
1000
1011
11X1
$p->{'type'} eq "string" and $p->{'min'} || $p->{'max'} || $p->{'matches'}
9311100
ABdec
0X0
100
111
$output->{'_error_handling'} and $output->{'_error_handling'}{'exception_handling'}
936750
Adec
00
11
$schema->{'method_name'} || 'method'
9636100
ABdec
000
011
1X1
$code =~ /(?:die|croak|confess)[^;]*if\s+\$$param1\s+&&\s+\$$param2/ or $code =~ /(?:die|croak|confess)[^;]*if\s+\$$param2\s+&&\s+\$$param1/
964233
ABdec
0X0
100
111
$rel->{'type'} eq "mutually_exclusive" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1)
67
ABdec
0X0
100
111
$rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1
966167
ABdec
000
011
1X1
$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
966633
ABdec
0X0
100
111
$rel->{'type'} eq "mutually_exclusive" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1)
33
ABdec
0X0
100
111
$rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1
9719100
ABdec
000
011
1X1
$code =~ /(?:die|croak|confess)[^;]*unless\s+\$$param1\s+\|\|\s+\$$param2/ or $code =~ /(?:die|croak|confess)[^;]*unless\s+\$$param2\s+\|\|\s+\$$param1/
972533
ABdec
0X0
100
111
$rel->{'type'} eq "required_group" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1)
33
ABdec
0X0
100
111
$rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1
974567
ABdec
000
011
1X1
$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
975033
ABdec
0X0
100
111
$rel->{'type'} eq "required_group" and ($rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1)
33
ABdec
0X0
100
111
$rel->{'params'}[0] eq $param2 and $rel->{'params'}[1] eq $param1
9876100
ABdec
0X0
100
111
$code =~ /(?:die|croak|confess)\s+['"]\w*${param1}[^'"]*requires[^'"]*$param2/i and $code =~ /if\s+\$$param1\s+&&\s+!\$$param2/
999733
ABdec
000
011
1X1
$self->{'_package_name'} //= $package_name
10060100
ABdec
0X0
100
111
@with_pos and grep {not $output->{'input'}{$_}{'named'};} @without_pos
1006950
Adec
00
11
$schema->{'output'} and scalar keys %{$$schema{"output"};}
10070100
ABdec
0X0
100
111
ref $schema->{'output'}{'_error_handling'} eq "HASH" and scalar keys %{$$schema{"output"}{"_error_handling"};} == 0
1007967
ABdec
0X0
100
111
$schema->{'output'}{'type'} and $schema->{'output'}{'type'} eq "scalar"
10087100
ABdec
000
011
1X1
ref $schema->{'new'} or $schema->{'new'} eq $package_name
1010467
ABdec
0X0
100
111
$schema->{'relationships'} and @{$schema->{'relationships'};}
10108100
Adec
00
11
$schema->{'accessor'} and scalar keys %{$$schema{"accessor"};}
1018867
ABdec
0X0
100
111
$schema->{'relationships'} and @{$schema->{'relationships'};}
10202100
Adec
00
11
$schema->{'_notes'} and scalar @{$schema->{'_notes'};}
1023467
ABdec
0X0
100
111
$p->{'type'} and $p->{'type'} eq "coderef"
10238100
ABdec
0X0
100
111
$p->{'semantic'} and $p->{'semantic'} eq "filehandle"
10242100
ABdec
0X0
100
111
$p->{'isa'} and $p->{'isa'} =~ /DateTime/
1029967
ABdec
0X0
100
111
defined $param->{'_source'} and length $param->{'_source'}
1030767
ABdec
0X0
100
111
defined $source and length $source
1031750
Adec
00
11
$param->{'isa'} || 'DateTime'
103210
Adec
00
11
$param->{'isa'} || 'Time::Piece'
1032650
Adec
00
11
$cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}\$/"
103320
Adec
00
11
$cleaned{'type'} //= "string"
1033550
Adec
00
11
$cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z?\$/"
1033950
Adec
00
11
$cleaned{'min'} ||= 0
1034067
ABdec
000
011
1X1
$cleaned{'max'} ||= $INT32_MAX
1034850
Adec
00
11
$param->{'isa'} || 'IO::Handle'
1035350
Adec
00
11
$cleaned{'matches'} ||= "/^[\\w\\/.\\-_]+\$/"
1037950
Adec
00
11
$param->{'_source'} // ""
25
ABCdec
0XX0
10X0
1100
1111
($param->{'_source'} // "") eq "input_spec" and defined $param->{'type'} and $param->{'type'} ne "string"
1038433
ABdec
0X0
100
111
$param->{'enum'} and ref $param->{'enum'} eq "ARRAY"
10408100
ABdec
0X0
100
111
($param->{'_source'} // '') eq 'input_spec' && defined $param->{'type'} && $param->{'type'} ne 'string'
1040960
ABCDdec
0XXX0
10XX0
110X0
11100
11111
$param->{'enum'} and ref $param->{'enum'} eq "ARRAY" and not $cleaned{'enum'} and not $formal_non_string
1041267
ABdec
0X0
100
111
$param->{'memberof'} and ref $param->{'memberof'} eq "ARRAY"
10417100
ABdec
0X0
100
111
$param->{'isa'} and not $cleaned{'isa'}
1043350
Adec
00
11
&reftype($pattern) // ""
10458100
Adec
00
11
$cleaned{'semantic'} // ""
1053533
ABdec
0X0
100
111
defined $body and length $body
1054867
ABdec
000
011
1X1
$body =~ /\b(?:PPI::Document->new|_load_schema|_slurp|read_file|slurp_file)\s*\(\s*\$$v\b/ or $body =~ /\bopen\b\s*\(?[^;]*['"]<[^;]*\$$v\b/
1055267
ABdec
000
011
1X1
$body =~ /-[ef]\s+\$args\{\s*['"]?${p}['"]?\s*\}/ || $body =~ /-[ef]\s+\$$v\b/ || $body =~ /-[ef]\s+\$self->\{\s*['"]?${p}['"]?\s*\}/
1055775
ABCdec
00X0
0100
0111
1XX1
$tests_existence ||= $param eq 'config_file' && $body =~ /\bObject::Configure::configure\s*\(/
1057450
Adec
00
11
$_[0] // ""
10607100
ABdec
0X0
100
111
$depth == 0 and defined $pending
10616100
ABdec
0X0
100
111
$depth == 0 and defined $name
1064950
Adec
00
11
$spec->{'type'} // ""
1065050
ABCdec
0XX0
10X0
1100
1111
$type =~ /\bobject\b/ and not defined $spec->{'can'} and not defined $spec->{'isa'}
1065350
Adec
00
11
$spec->{'semantic'} // ""
1067133
ABdec
0X0
100
111
defined $content and length $content
1068250
Adec
00
11
$spec->{'type'} // ""
1068367
ABdec
000
011
1X1
$type eq "arrayref" or $type eq "array"
1069267
ABdec
000
011
1X1
$content =~ /$field\s*(?:->\s*)?\[\s*[^\]]+\s*\]\s*->\s*\w+/ || $content =~ /\bblessed\s*\(\s*$field\s*(?:->\s*)?\[\s*[^\]]+\s*\]\s*\)/
10696100
ABdec
000
011
1X1
$empty_guard or $elements_are_objects
1072633
ABdec
0X0
100
111
defined $pod and length $pod
1075567
ABdec
0X0
100
111
defined $base and $base eq "Database::Abstraction"
1075750
Adec
00
11
$ctor_schema->{'input'} // {}
1076025
ABCdec
0XX0
10X0
1100
1111
defined $join_column and not ref $join_column and length $join_column
10795100
ABdec
0X0
100
111
ref $element eq "HASH" and ref $element->{'col'} eq "HASH"
1079633
ABdec
0X0
100
111
ref $element->{'col'}{'memberof'} eq "ARRAY" and @{$element->{'col'}{'memberof'};}
1083867
ABdec
0X0
100
111
$body =~ /\breturn\s*\{[^}]*\bdbh\s*=>/s and $pod =~ /\bdbh\b/
1084133
ABdec
0X0
100
111
$body =~ /\$self\s*->\s*\{_sqlite_cache\}\s*=\s*\{/s and $body =~ /\bdbh\s*=>/
10846100
ABdec
0X0
100
111
$pod =~ /\b(?:SQLite\s+)?cache/i and $body =~ /\$self\s*->\s*(?:_build_sqlite_cache|_sqlite_join|_sqlite_aggregate)\s*\(/
1085950
Adec
00
11
$body // ""
1087733
ABdec
0X0
100
111
defined $content and length $content
10880100
ABdec
0X0
100
111
$content =~ /\bcroak\b/ and $content =~ /\beq\s+__PACKAGE__\b/
1090350
Adec
00
11
$ctor_schema->{'input'} // {}
1090650
Adec
00
11
$input->{$param_name} // {}
1092750
Adec
00
11
$spec->{'type'} // "string"
1096650
Adec
00
11
$method_info ||= {}
1097467
ABdec
000
011
1X1
$self->{'_package_name'} //= $current_package
1101650
ABCdec
0XX0
1000
1011
11X1
$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'};}
1103867
ABdec
0X0
100
111
$inheritance_info and $inheritance_info->{'use_parent_constructor'}
11078100
ABdec
0X0
100
111
$is_factory and not $skip_object
1112767
ABdec
000
011
1X1
$method_body =~ /return\s+bless\s*\{[^}]*\},\s*['"]?(\w+(?:::\w+)*|\$\w+)['"]?/s or $method_body =~ /bless\s*\{[^}]*\},\s*['"]?(\w+(?:::\w+)*|\$\w+)['"]?.*return/s
11146100
ABdec
000
011
1X1
$method_body =~ /return\s+([\$\w:]+)->new\(/s or $method_body =~ /([\$\w:]+)->new\(.*return/s
1115125
ABCdec
0000
0011
01X1
1XX1
$target eq "\$self" or $target eq "shift" or $target =~ /^\$/
1116733
ABdec
000
011
1X1
$method_body =~ /return\s+([\$\w:]+)->(create_|make_|build_|get_)/i or $method_body =~ /([\$\w:]+)->(create_|make_|build_|get_).*return/is
1117650
ABCdec
0XX0
10X0
1100
1111
$method_info and ref $method_info eq "HASH" and $method_info->{'pod'}
1122767
ABdec
000
011
1X1
$method_body =~ /(?:my\s+)?(?:our\s+)?\$(?:instance|_instance|singleton)\b/s or $method_body =~ /state\s+\$(?:instance|_instance|singleton)\b/s
1123467
ABdec
000
011
1X1
$method_body =~ /return\s+\$instance\s+if\s+(?:defined\s+)?\$instance/ or $method_body =~ /unless\s+\$instance.*?=\s*.*?new/
1124167
ABdec
000
011
1X1
$method_body =~ /\$instance\s*\|\|=\s*.*?new/ or $method_body =~ /\$instance\s*=\s*.*?new\s+unless\s+(?:defined\s+)?\$instance/
1132967
ABdec
0X0
100
111
$method_name =~ /^_/ and not $method_name =~ /^_new/
11376100
Adec
00
11
$doc->find('PPI::Statement::Include') || []
11393100
Adec
00
11
$doc->find('PPI::Statement::Variable') || []
1140650
Adec
00
11
$doc->find('PPI::Statement') || []
11418100
ABdec
0X0
100
111
$method_body and $method_body =~ /SUPER::/
1159750
ABCdec
0000
0011
01X1
1XX1
$class eq "main" or $class eq "__PACKAGE__" or $class =~ /^\$/
1166650
ABCdec
0XX0
10X0
1100
1111
$_[1]->isa("PPI::Statement::Include") and $_[1]->type eq "use" and $_[1]->module =~ /^(parent|base)$/
1168133
ABdec
0X0
100
111
$isa_stmt and $isa_stmt->content =~ /['"](\w+(?:::\w+)*)['"]/
1171733
ABdec
000
011
1X1
$self->{'_package_name'} //= $package_name
11766100
ABdec
0X0
100
111
$param and $code
11912100
ABdec
000
011
1X1
$code =~ /\beq\s*''/ or $code =~ /\blength\s*\(/
12044100
Adec
00
11
$hints->{'valid_inputs'} ||= []
12051100
Adec
00
11
$hints->{$k} //= []
12189100
ABdec
000
011
1X1
$value =~ /^\$[a-zA-Z_]/ or $value =~ /\(.*\)/
12236100
Adec
00
11
$pod_params->{$param} || {}
12237100
Adec
00
11
$code_params->{$param} || {}
12244100
Adec
00
11
$pod->{'_source'} // ""
12246100
ABdec
0X0
100
111
exists $pod_params->{$param} and not exists $code_params->{$param}
1225167
ABdec
0X0
100
111
not exists $pod_params->{$param} and exists $code_params->{$param}
12265100
ABCdec
0XX0
10X0
1100
1111
$pod->{'type'} and $code->{'type'} and $pod->{'type'} ne $code->{'type'}
1227475
ABCdec
0XX0
10X0
1100
1111
exists $pod->{'optional'} and exists $code->{'optional'} and $pod->{'optional'} != $code->{'optional'}
1228250
ABCdec
0XX0
10X0
1100
1111
$pod->{'matches'} and $code->{'matches'} and $pod->{'matches'} ne $code->{'matches'}
12288100
ABCdec
0XX0
10X0
1100
1111
defined $pod->{'min'} and defined $code->{'min'} and $pod->{'min'} != $code->{'min'}
12292100
ABCdec
0XX0
10X0
1100
1111
defined $pod->{'max'} and defined $code->{'max'} and $pod->{'max'} != $code->{'max'}
12296100
ABCdec
0XX0
10X0
1100
1111
defined $pod->{'min'} and defined $code->{'max'} and $pod->{'min'} > $code->{'max'}
1230075
ABCdec
0XX0
10X0
1100
1111
defined $code->{'min'} and defined $pod->{'max'} and $code->{'min'} > $pod->{'max'}