Condition Coverage

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

line%coveragecondition
135550
Adec
00
11
Params::Get::get_params('input_file', @_) || {}
136950
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
1457100
Adec
00
11
Params::Get::get_params(undef, @_) || {}
147067
ABdec
000
011
1X1
$self->{'_package_name'} //= $package_name
1520100
Adec
00
11
$document->find('PPI::Statement::Package') || []
152667
ABdec
000
011
1X1
$self->{'_package_name'} //= $pkgs->[0]->namespace
1562100
Adec
00
11
$document->find('PPI::Statement::Sub') || []
156950
Adec
00
11
$document->find(sub {         $_[1]->content =~ /^\s*(?:before|after|around)\b/ if $_[1]->isa('PPI::Statement'); } ) || []
1580100
ABdec
0X0
100
111
$name =~ /^_/ and not $name =~ /^_(new|init|build)/
16180
ABdec
0X0
100
111
$next_sib and not $next_sib->isa("PPI::Statement::Sub")
16220
ABdec
0X0
100
111
$next_sib and $next_sib->isa("PPI::Statement::Sub")
170750
Adec
00
11
$2 || '()'
171033
ABdec
0X0
100
111
$method_name =~ /^_/ and not $method_name =~ /^_(new|init|build)/
177567
ABdec
0X0
100
111
$current and $steps++ < $POD_WALK_LIMIT
177667
ABdec
000
011
1X1
$current->isa("PPI::Token::Whitespace") or $current->isa("PPI::Token::Separator")
184867
ABdec
0X0
100
111
$method->{'fields'} and keys %{$$method{"fields"};}
187167
ABdec
0X0
100
111
$self->{'strict_pod'} and $pod
19160
Adec
00
11
$schema->{'input'}{$name} //= {}
1954100
ABdec
0X0
100
111
$method->{'name'} ne "new" and $needs_object
1970100
Adec
00
11
$schema->{'_analysis'} ||= {}
1973100
Adec
00
11
$schema->{'_analysis'}{'confidence_factors'} ||= {}
1974100
ABdec
000
011
1X1
$schema->{'_analysis'}{'confidence_factors'}{'input'} ||= $input_confidence->{'factors'}
197533
ABdec
000
011
1X1
$schema->{'_analysis'}{'confidence_factors'}{'output'} ||= $output_confidence->{'factors'}
1999100
Adec
00
11
$input_level //= "none"
200050
Adec
00
11
$output_level //= "none"
200767
ABdec
0X0
100
111
$relationships and @{$relationships;}
203750
Adec
00
11
$schema->{'_yamltest_hints'} ||= {}
204050
Adec
00
11
$schema->{'_yamltest_hints'}{'boundary_values'} ||= []
2054100
Adec
00
11
$schema->{'_yamltest_hints'} ||= {}
2061100
ABdec
0X0
100
111
$level_rank{$overall} < $level_rank{$LEVEL_MEDIUM} and $level_rank{$overall} < $self->{'confidence_threshold'} * 4
214875
ABCdec
0XX0
10X0
1100
1111
$schema->{'output'} and $schema->{'output'}{'type'} and $schema->{'output'}{'type'} =~ /^(number|integer)$/
215367
ABdec
0X0
100
111
$p->{'type'} and $p->{'type'} =~ /^(number|integer)$/
223250
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*\@_/
75
ABCdec
0XX0
10X0
1100
1111
$code =~ /if\s*\(\s*(?:\@_|[\$]\w+)/ 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*;/
22530
Adec
00
11
$schema->{'input'} ||= {"value", {"type", "string", "optional", 1}}
231950
Adec
00
11
$schema->{'input'} ||= {"value", {"type", "string", "optional", 1}}
243950
ABCdec
0XX0
10X0
1100
1111
$schema->{'accessor'}{'type'} and $schema->{'accessor'}{'type'} =~ /setter|getset/ and $schema->{'input'}
2443100
ABdec
0X0
100
111
$in->{'type'} and $in->{'type'} eq "object"
245767
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'
2492100
Adec
00
11
$args{'method'} // "UNKNOWN"
2493100
Adec
00
11
$args{'message'} // "Analysis error"
2495100
Adec
00
11
$self->{'_package_name'} // "UNKNOWN"
2496100
Adec
00
11
$self->{'input_file'} // "UNKNOWN"
253650
ABCdec
0XX0
10X0
1100
1111
$res and ref $res eq "HASH" and keys %{{} unless $res->{'input'};}
257033
ABdec
000
011
1X1
$child->isa("PPI::Statement") or $child->isa("PPI::Statement::Expression")
25740
ABdec
000
011
1X1
$_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator')
25790
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")
25880
ABdec
0X0
100
111
$key and $val
25920
ABdec
000
011
1X1
$inner->isa("PPI::Statement") or $inner->isa("PPI::Statement::Expression")
25950
ABdec
000
011
1X1
$_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator')
25990
ABdec
0X0
100
111
$k and $v
26050
ABdec
0X0
100
111
$keyname =~ /^(min|max)$/ and &looks_like_number($value)
26160
Adec
00
11
$param{'type'} //= "string"
26170
Adec
00
11
$param{'optional'} //= 0
265867
ABdec
0X0
100
111
ref $code and $code->can("find")
2660100
Adec
00
11
$self->{'_ppi_cache'} ||= {}
266167
ABdec
000
011
1X1
$self->{'_ppi_cache'}{$code} //= "PPI::Document"->new(\$code)
2689100
ABdec
000
011
1X1
$_[1]->content eq "validate_strict" or $_[1]->content eq "Params::Validate::Strict::validate_strict"
269467
ABdec
0X0
100
111
$list and not $list->isa("PPI::Structure::List")
2754100
ABdec
000
011
1X1
$_[1]->content eq "validate" or $_[1]->content eq "Params::Validate::validate"
275967
ABdec
0X0
100
111
$list and not $list->isa("PPI::Structure::List")
276633
ABdec
0X0
100
111
$schema_text and not $schema_text =~ /$UNSAFE_KEYWORD_RE/
290167
ABdec
0X0
100
111
$list and not $list->isa("PPI::Structure::List")
290833
ABdec
0X0
100
111
$schema_text and not $schema_text =~ /$UNSAFE_KEYWORD_RE/
298967
ABdec
0X0
100
111
$block and $block->can("children")
29930
ABCdec
0XX0
10X0
1100
1111
$result and ref $result eq "HASH" and $result->{'input'}
323933
ABdec
000
011
1X1
$signature_expr =~ /$UNSAFE_KEYWORD_RE/ or $signature_expr =~ /$UNSAFE_CHAR_RE/
334767
ABdec
0X0
100
111
$stderr and length $stderr
335567
ABdec
0X0
100
111
defined $stdout and length $stdout
3411100
Adec
00
11
$type_map{$p->{'type'}} // "string"
343050
Adec
00
11
$type_map{$ret->{'type'}} // "string"
350233
ABdec
0X0
100
111
@sig_params and $sig_params[0] =~ /^(self|class)$/i
350633
ABdec
000
011
1X1
$params{$param}{'position'} //= $position_counter
353667
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
3546100
Adec
00
11
$params{$name} ||= {"_source", "pod"}
355633
ABdec
000
011
1X1
$type eq "num" or $type eq "float"
3570100
Adec
00
11
$desc || ''
100
Adec
00
11
$constraint || ''
3587100
ABdec
0X0
100
111
$desc and $desc =~ m[matches?\s+(/[^/]+/|qr/.+?/)]i
361150
Adec
00
11
$params{$name} ||= {"_source", "pod"}
361533
ABdec
000
011
1X1
$type eq "num" or $type eq "float"
365233
ABdec
0X0
100
111
defined $name and length $name
3659100
Adec
00
11
$params{$name} ||= {"_source", "pod"}
366933
ABdec
000
011
1X1
$type eq "num" or $type eq "float"
374850
Adec
00
11
$params{$_}{'position'} // -1
3767100
Adec
00
11
$params{$name} //= {"_source", "pod"}
397533
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
399633
ABdec
0X0
100
111
defined $output->{'type'} and $output->{'type'} eq "scalar"
399950
Adec
00
11
$output->{'type'} ||= "boolean"
400950
Adec
00
11
$output->{'type'} ||= "boolean"
4017100
ABdec
0X0
100
111
not $output->{'type'} and $pod =~ /returns?\s+(?:an?\s+)?(\w+)/i
402833
ABdec
000
011
1X1
$type eq 1 or $type eq 0
404233
ABdec
0X0
100
111
not $type and $pod =~ /returns?\s+.+\slist\b/i
4171100
ABdec
0X0
100
111
$boolean_count >= 2 and $boolean_count >= $total_count * "0.8"
4181100
ABdec
0X0
100
111
$code =~ /return\s+\$self\s*;/ and $code =~ /\$self\s*->\s*\{[^}]+\}\s*=/
41860
ABdec
0X0
100
111
$self->{'_document'} and my $package_stmt = $self->{'_document'}->find_first("PPI::Statement::Package")
41880
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
42130
Adec
00
11
$output->{'isa'} || 'UNKNOWN'
42140
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
422750
Adec
00
11
$output->{'isa'} || 'UNKNOWN'
422833
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
4252100
ABdec
0X0
100
111
$ret =~ /=/ and $ret =~ /\$\w+/
100
ABdec
000
011
1X1
$ret eq 1 or $ret eq 0
432667
ABdec
0X0
100
111
$return_types{'integer'} and not $return_types{'string'}
432767
ABdec
000
011
1X1
not $output->{'type'} or $output->{'type'} eq "scalar"
433050
Adec
00
11
$output->{'_type_confidence'} ||= "low"
434150
Adec
00
11
$output->{'_type_confidence'} ||= "medium"
4352100
ABdec
0X0
100
111
@return_statements == 1 and $return_statements[0] eq 1
435433
ABdec
000
011
1X1
not $output->{'type'} or $output->{'type'} eq "scalar"
439667
ABdec
000
011
1X1
not $output->{'type'} or $output->{'type'} eq "unknown"
439967
ABdec
0X0
100
111
$pod and not $output->{'type'}
445920
ABCDdec
00000
00011
001X1
01XX1
1XXX1
not $output->{'type'} or $output->{'type'} eq "scalar" or $output->{'type'} eq "array" or $output->{'type'} eq "undef"
446050
Adec
00
11
$output->{'type'} || 'none'
454867
ABdec
0X0
100
111
$comma_count > 0 and not $content =~ /\b(?:bless|new)\b/
455067
ABdec
0X0
100
111
$output->{'type'} and $output->{'type'} eq "boolean"
4634100
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
4642100
ABdec
0X0
100
111
$output->{'type'} and $output->{'type'} eq "boolean"
468667
ABdec
0X0
100
111
$self_returns > 0 and $total_returns > 0
469733
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
4766100
ABdec
0X0
100
111
$zero_returns > 0 and $one_returns > 0
478367
ABdec
000
011
1X1
/^\s*undef\s*$/ || /^\s*$/
478550
ABCdec
0XX0
10X0
1100
1111
$has_undef and $has_value and scalar @all_returns >= 2
486675
ABCdec
0000
0011
01X1
1XX1
$expr =~ /^\@\w+/ or $expr =~ /^qw\(/ or $expr =~ /^\@\{/
4876100
ABdec
000
011
1X1
$expr =~ /^\[/ or $expr =~ /^\\\@/
4881100
ABdec
000
011
1X1
$expr =~ /^\{/ or $expr =~ /^\\\%/
488633
ABdec
000
011
1X1
$expr =~ /^\%\w+/ or $expr =~ /^\%\{/
489167
ABdec
000
011
1X1
$expr =~ /^['"]/ or $expr =~ /['"]$/
494680
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
4978100
ABCdec
0XX0
10X0
1100
1111
defined $output->{'type'} and $output->{'type'} eq "boolean" and not defined $output->{'value'}
498150
ABCdec
0XX0
10X0
1100
1111
$output->{'value'} and defined $output->{'type'} and $output->{'type'} ne "boolean"
503767
ABdec
0X0
100
111
$param->{'type'} and $param->{'type'} eq "integer"
503867
ABdec
0X0
100
111
$param->{'type'} and $param->{'type'} eq "number"
511450
Adec
00
11
$params{$name} //= {"_source", "code", "position", $pos++}
5123100
ABdec
0X0
100
111
$params{$param}{'_default'} and not $params{$param}{'type'}
517850
Adec
00
11
$$p->{'type'} //= "number"
51830
Adec
00
11
$$p->{'type'} //= "number"
526867
ABdec
000
011
1X1
$code =~ /\%\{\s*\$$param\s*\}/ or $code =~ /\$$param\s*->\s*\{/
33
ABdec
000
011
1X1
$code =~ /\@\{\s*\$$param\s*\}/ or $code =~ /push\s*\(\s*\@?\$$param/
5276100
ABdec
0X0
100
111
not $p->{'type'} and exists $p->{'_default'}
5297100
ABdec
000
011
1X1
$code =~ /\$$param\s*(?:==|!=|<=|>=|<|>)/ or $code =~ /(?:==|!=|<=|>=|<|>)\s*\$$param/
60
ABCDdec
00000
00011
001X1
01XX1
1XXX1
$code =~ m[\$$param\s*(?:[\+\-\*\%]|/(?!/))] or $code =~ m[(?:[\+\-\*\%]|/(?!/))\s*\$$param] or $code =~ /\bint\s*\(\s*\$$param\s*\)/ or $code =~ /\babs\s*\(\s*\$$param\s*\)/
539633
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
541733
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)/
544550
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*\)/
545633
ABdec
000
011
1X1
$code =~ /strptime\s*\(\s*\$$param/ or $code =~ /DateTime::Format::\w+\s*->\s*parse_datetime\s*\(\s*\$$param/
548933
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
551833
ABdec
000
011
1X1
$code =~ /File::(?:Spec|Basename)::\w+\s*\(\s*\$$param/ or $code =~ /(?:basename|dirname|fileparse)\s*\(\s*\$$param/
552867
ABdec
0X0
100
111
defined $p->{'_default'} and $p->{'_default'} =~ m[^([A-Za-z]:\\|/|\./|\.\./)]
553633
ABdec
000
011
1X1
$code =~ /\$$param\s*->\s*isa\s*\(\s*['"]IO::File['"]\s*\)/ or $code =~ /IO::File\s*->\s*new\s*\(\s*\$$param/
556933
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
558050
ABCdec
0000
0011
01X1
1XX1
$code =~ /\$$param\s*->\s*\(/ or $code =~ /\$$param\s*->\s*\(\s*\@_\s*\)/ or $code =~ /&\s*\{\s*\$$param\s*\}/
559833
ABdec
0X0
100
111
$code =~ /blessed\s*\(\s*\$$param\s*\)/ and $code =~ /ref\s*\(\s*\$$param\s*\)\s*eq\s*['"]CODE['"]/i
563733
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
565767
ABdec
0X0
100
111
defined $values_str and $code =~ /\$$hash_name\s*\{\s*\$$param\s*\}/
571333
ABdec
000
011
1X1
$code =~ /\$$param\s*~~\s*\[([^\]]+)\]/ or $code =~ /\$$param\s*~~\s*qw\s*[\(\[<{]([^)\]>}]+)[\)\]>}]/
577267
ABdec
000
011
1X1
$1 || $2
5779100
Adec
00
11
$$p->{'_invalid'} ||= []
5780100
Adec
00
11
$$p->{'_errors'} ||= []
589350
Adec
00
11
$params->{$name} //= {"_source", "code", "optional", 1, "position", $pos++}
590950
Adec
00
11
$params->{$name} //= {"_source", "code", "optional", 1}
592533
ABdec
0X0
100
111
@shifts and $shifts[0] =~ /^(self|class)$/i
592850
Adec
00
11
$params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++}
59400
Adec
00
11
$params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++}
618733
ABdec
000
011
1X1
$default eq 1 or $default eq 0
624367
ABdec
0X0
100
111
defined $value and $value ne ""
645450
Adec
00
11
$params->{$param_name} ||= {}
657550
Adec
00
11
$params->{$param} ||= {}
6611100
ABdec
000
011
1X1
keys %{$params;} || $code =~ /my\s+\$(?:self|class)\s*=\s*\$_\[0\]/
661850
ABCdec
0XX0
10X0
1100
1111
$var eq "class" and $position == 0 and $method->{'name'} eq "new"
25
ABCdec
0XX0
10X0
1100
1111
$var eq "self" and $position == 0 and $method->{'name'} ne "new"
66250
Adec
00
11
$params->{$var} ||= {"position", $position++}
663450
ABCdec
0XX0
10X0
1100
1111
$var eq "class" and $position == 0 and $method->{'name'} eq "new"
50
ABCdec
0XX0
10X0
1100
1111
$var eq "self" and $position == 0 and $method->{'name'} ne "new"
664150
Adec
00
11
$params->{$var} ||= {"position", $position++}
66490
ABCdec
0000
0011
01X1
1XX1
$var ne "class" or $position > 0 or $method->{'name'} ne "new"
66500
Adec
00
11
$params->{$var} ||= {"position", $index}
676750
Adec
00
11
$p->{'type'} ||= "string"
6785100
Adec
00
11
$p->{'type'} ||= "string"
6799100
ABdec
0X0
100
111
not $guarded and $code =~ /\$$param\s*([<>]=?)\s*([+-]?(?:\d+\.?\d*|\.\d+))/
680433
ABdec
000
011
1X1
$p->{'type'} ||= &looks_like_number($val) ? "number" : "integer"
680667
ABdec
000
011
1X1
$op eq ">" or $op eq ">="
67
ABdec
000
011
1X1
$op eq "<" or $op eq "<="
680933
ABdec
000
011
1X1
not defined $p->{'max'} or $max < $p->{'max'}
681233
ABdec
000
011
1X1
not defined $p->{'min'} or $min > $p->{'min'}
681950
Adec
00
11
$p->{'type'} ||= "string"
6869100
ABdec
0X0
100
111
defined $default_value and not exists $p->{'_default'}
68750
ABdec
0X0
100
111
defined $default_value and not ref $default_value
6893100
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'}
689667
ABdec
000
011
1X1
$assignment =~ /\$$param/ or $assignment =~ /^shift/
6963100
ABdec
0X0
100
111
$pod->{$param} and defined $pod->{$param}{'position'}
696433
ABdec
0X0
100
111
$sig->{$param} and defined $sig->{$param}{'position'}
6965100
ABdec
0X0
100
111
$code->{$param} and defined $code->{$param}{'position'}
698880
ABCDdec
0XXX0
10XX0
110X0
11100
11111
$key eq "type" and $pod->{$param} and $pod->{$param}{'_from_input_spec'} and not defined $pod->{$param}{'type'}
699283
ABCDEdec
00XXX0
010XX0
0110X0
011100
011111
1XXXX1
not exists $p->{$key} or $key eq "type" and $from_pod and $p->{'type'} eq "string" and $code->{$param}{$key} ne "string"
70050
ABdec
000
011
1X1
$p->{$key} //= $sig->{$param}{$key}
701850
Adec
00
11
$merged{$b}{'position'} || 999
50
Adec
00
11
$merged{$a}{'position'} || 999
702350
Adec
00
11
$p->{'type'} || 'none'
100
Adec
00
11
$p->{'position'} || 'none'
7121100
ABCdec
0XX0
1000
1011
11X1
$p->{'type'} eq "string" and $p->{'min'} || $p->{'max'} || $p->{'matches'}
7318100
ABdec
0X0
100
111
$output->{'_error_handling'} and $output->{'_error_handling'}{'exception_handling'}
737450
Adec
00
11
$schema->{'method_name'} || 'method'
7643100
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/
764933
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
766867
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
767333
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
7726100
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/
773233
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
775267
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
775733
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
7883100
ABdec
0X0
100
111
$code =~ /(?:die|croak|confess)\s+['"]\w*${param1}[^'"]*requires[^'"]*$param2/i and $code =~ /if\s+\$$param1\s+&&\s+!\$$param2/
800533
ABdec
000
011
1X1
$self->{'_package_name'} //= $package_name
804867
ABdec
0X0
100
111
@with_pos and @without_pos
805750
Adec
00
11
$schema->{'output'} and scalar keys %{$$schema{"output"};}
8058100
ABdec
0X0
100
111
ref $schema->{'output'}{'_error_handling'} eq "HASH" and scalar keys %{$$schema{"output"}{"_error_handling"};} == 0
806467
ABdec
0X0
100
111
$schema->{'output'}{'type'} and $schema->{'output'}{'type'} eq "scalar"
807267
ABdec
000
011
1X1
ref $schema->{'new'} or $schema->{'new'} eq $package_name
808967
ABdec
0X0
100
111
$schema->{'relationships'} and @{$schema->{'relationships'};}
8093100
Adec
00
11
$schema->{'accessor'} and scalar keys %{$$schema{"accessor"};}
817267
ABdec
0X0
100
111
$schema->{'relationships'} and @{$schema->{'relationships'};}
817833
ABdec
000
011
1X1
$rel->{'description'} || _format_relationship($rel)
8184100
Adec
00
11
$schema->{'_notes'} and scalar @{$schema->{'_notes'};}
821667
ABdec
0X0
100
111
$p->{'type'} and $p->{'type'} eq "coderef"
8220100
ABdec
0X0
100
111
$p->{'semantic'} and $p->{'semantic'} eq "filehandle"
8224100
ABdec
0X0
100
111
$p->{'isa'} and $p->{'isa'} =~ /DateTime/
828550
Adec
00
11
$param->{'isa'} || 'DateTime'
82890
Adec
00
11
$param->{'isa'} || 'Time::Piece'
829450
Adec
00
11
$cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}\$/"
829850
Adec
00
11
$cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z?\$/"
830250
Adec
00
11
$cleaned{'min'} ||= 0
830367
ABdec
000
011
1X1
$cleaned{'max'} ||= $INT32_MAX
831150
Adec
00
11
$param->{'isa'} || 'IO::Handle'
831650
Adec
00
11
$cleaned{'matches'} ||= "/^[\\w\\/.\\-_]+\$/"
832533
ABdec
0X0
100
111
$param->{'enum'} and ref $param->{'enum'} eq "ARRAY"
833575
ABCdec
0XX0
10X0
1100
1111
$param->{'enum'} and ref $param->{'enum'} eq "ARRAY" and not $cleaned{'enum'}
833833
ABdec
0X0
100
111
$param->{'memberof'} and ref $param->{'memberof'} eq "ARRAY"
8343100
ABdec
0X0
100
111
$param->{'isa'} and not $cleaned{'isa'}
843050
Adec
00
11
$method_info ||= {}
843867
ABdec
000
011
1X1
$self->{'_package_name'} //= $current_package
848050
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'};}
850267
ABdec
0X0
100
111
$inheritance_info and $inheritance_info->{'use_parent_constructor'}
8542100
ABdec
0X0
100
111
$is_factory and not $skip_object
859167
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
8610100
ABdec
000
011
1X1
$method_body =~ /return\s+([\$\w:]+)->new\(/s or $method_body =~ /([\$\w:]+)->new\(.*return/s
861525
ABCdec
0000
0011
01X1
1XX1
$target eq "\$self" or $target eq "shift" or $target =~ /^\$/
863133
ABdec
000
011
1X1
$method_body =~ /return\s+([\$\w:]+)->(create_|make_|build_|get_)/i or $method_body =~ /([\$\w:]+)->(create_|make_|build_|get_).*return/is
864050
ABCdec
0XX0
10X0
1100
1111
$method_info and ref $method_info eq "HASH" and $method_info->{'pod'}
869167
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
869867
ABdec
000
011
1X1
$method_body =~ /return\s+\$instance\s+if\s+(?:defined\s+)?\$instance/ or $method_body =~ /unless\s+\$instance.*?=\s*.*?new/
870567
ABdec
000
011
1X1
$method_body =~ /\$instance\s*\|\|=\s*.*?new/ or $method_body =~ /\$instance\s*=\s*.*?new\s+unless\s+(?:defined\s+)?\$instance/
879367
ABdec
0X0
100
111
$method_name =~ /^_/ and not $method_name =~ /^_new/
8840100
Adec
00
11
$doc->find('PPI::Statement::Include') || []
8857100
Adec
00
11
$doc->find('PPI::Statement::Variable') || []
887050
Adec
00
11
$doc->find('PPI::Statement') || []
8882100
ABdec
0X0
100
111
$method_body and $method_body =~ /SUPER::/
906150
ABCdec
0000
0011
01X1
1XX1
$class eq "main" or $class eq "__PACKAGE__" or $class =~ /^\$/
913050
ABCdec
0XX0
10X0
1100
1111
$_[1]->isa("PPI::Statement::Include") and $_[1]->type eq "use" and $_[1]->module =~ /^(parent|base)$/
914533
ABdec
0X0
100
111
$isa_stmt and $isa_stmt->content =~ /['"](\w+(?:::\w+)*)['"]/
918133
ABdec
000
011
1X1
$self->{'_package_name'} //= $package_name
9230100
ABdec
0X0
100
111
$param and $code
9376100
ABdec
000
011
1X1
$code =~ /\beq\s*''/ or $code =~ /\blength\s*\(/
9508100
Adec
00
11
$hints->{'valid_inputs'} ||= []
9515100
Adec
00
11
$hints->{$k} //= []
9653100
ABdec
000
011
1X1
$value =~ /^\$[a-zA-Z_]/ or $value =~ /\(.*\)/
9700100
Adec
00
11
$pod_params->{$param} || {}
9701100
Adec
00
11
$code_params->{$param} || {}
9709100
ABdec
0X0
100
111
exists $pod_params->{$param} and not exists $code_params->{$param}
971467
ABdec
0X0
100
111
not exists $pod_params->{$param} and exists $code_params->{$param}
972875
ABCdec
0XX0
10X0
1100
1111
$pod->{'type'} and $code->{'type'} and $pod->{'type'} ne $code->{'type'}
973775
ABCdec
0XX0
10X0
1100
1111
exists $pod->{'optional'} and exists $code->{'optional'} and $pod->{'optional'} != $code->{'optional'}
974525
ABCdec
0XX0
10X0
1100
1111
defined $pod->{'min'} and defined $code->{'min'} and $pod->{'min'} != $code->{'min'}
974925
ABCdec
0XX0
10X0
1100
1111
defined $pod->{'max'} and defined $code->{'max'} and $pod->{'max'} != $code->{'max'}
975425
ABCdec
0XX0
10X0
1100
1111
$pod->{'matches'} and $code->{'matches'} and $pod->{'matches'} ne $code->{'matches'}