Condition Coverage

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

line%coveragecondition
127850
Adec
00
11
Params::Get::get_params('input_file', @_) || {}
129167
ABdec
000
011
1X1
$params->{'max_parameters'} // $DEFAULT_MAX_PARAMETERS
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
1379100
Adec
00
11
Params::Get::get_params(undef, @_) || {}
139067
ABdec
000
011
1X1
$self->{'_package_name'} //= $package_name
1440100
Adec
00
11
$document->find('PPI::Statement::Package') || []
144667
ABdec
000
011
1X1
$self->{'_package_name'} //= $pkgs->[0]->namespace
1482100
Adec
00
11
$document->find('PPI::Statement::Sub') || []
1483100
Adec
00
11
$document->find('PPI::Statement') || []
149267
ABdec
0X0
100
111
$name =~ /^_/ and not $name =~ /^_(new|init|build)/
15240
ABdec
0X0
100
111
$next_sib and not $next_sib->isa("PPI::Statement::Sub")
15280
ABdec
0X0
100
111
$next_sib and $next_sib->isa("PPI::Statement::Sub")
160067
ABdec
0X0
100
111
$depth > 0 and $class_end < length $content
161850
Adec
00
11
$2 || '()'
162133
ABdec
0X0
100
111
$method_name =~ /^_/ and not $method_name =~ /^_(new|init|build)/
168467
ABdec
0X0
100
111
$current and $steps++ < $POD_WALK_LIMIT
168567
ABdec
000
011
1X1
$current->isa("PPI::Token::Whitespace") or $current->isa("PPI::Token::Separator")
175667
ABdec
0X0
100
111
$method->{'fields'} and keys %{$$method{"fields"};}
1846100
ABdec
0X0
100
111
$method->{'name'} ne "new" and $needs_object
1862100
Adec
00
11
$schema->{'_analysis'} ||= {}
1865100
Adec
00
11
$schema->{'_analysis'}{'confidence_factors'} ||= {}
1866100
ABdec
000
011
1X1
$schema->{'_analysis'}{'confidence_factors'}{'input'} ||= $input_confidence->{'factors'}
186733
ABdec
000
011
1X1
$schema->{'_analysis'}{'confidence_factors'}{'output'} ||= $output_confidence->{'factors'}
1891100
Adec
00
11
$input_level //= "none"
189250
Adec
00
11
$output_level //= "none"
189967
ABdec
0X0
100
111
$relationships and @{$relationships;}
192950
Adec
00
11
$schema->{'_yamltest_hints'} ||= {}
193250
Adec
00
11
$schema->{'_yamltest_hints'}{'boundary_values'} ||= []
1949100
Adec
00
11
$schema->{'_yamltest_hints'} ||= {}
1956100
ABdec
0X0
100
111
$level_rank{$overall} < $level_rank{$LEVEL_MEDIUM} and $level_rank{$overall} < $self->{'confidence_threshold'} * 4
204375
ABCdec
0XX0
10X0
1100
1111
$schema->{'output'} and $schema->{'output'}{'type'} and $schema->{'output'}{'type'} =~ /^(number|integer)$/
204867
ABdec
0X0
100
111
$p->{'type'} and $p->{'type'} =~ /^(number|integer)$/
212750
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*;/
21480
Adec
00
11
$schema->{'input'} ||= {"value", {"type", "string", "optional", 1}}
221450
Adec
00
11
$schema->{'input'} ||= {"value", {"type", "string", "optional", 1}}
232450
ABCdec
0XX0
10X0
1100
1111
$schema->{'accessor'}{'type'} and $schema->{'accessor'}{'type'} =~ /setter|getset/ and $schema->{'input'}
2328100
ABdec
0X0
100
111
$in->{'type'} and $in->{'type'} eq "object"
234267
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'
23770
Adec
00
11
$args{'method'} // "UNKNOWN"
23780
Adec
00
11
$args{'message'} // "Analysis error"
23800
Adec
00
11
$self->{'_package_name'} // "UNKNOWN"
23810
Adec
00
11
$self->{'input_file'} // "UNKNOWN"
242150
ABCdec
0XX0
10X0
1100
1111
$res and ref $res eq "HASH" and keys %{{} unless $res->{'input'};}
245533
ABdec
000
011
1X1
$child->isa("PPI::Statement") or $child->isa("PPI::Statement::Expression")
24590
ABdec
000
011
1X1
$_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator')
24640
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")
24730
ABdec
0X0
100
111
$key and $val
24770
ABdec
000
011
1X1
$inner->isa("PPI::Statement") or $inner->isa("PPI::Statement::Expression")
24800
ABdec
000
011
1X1
$_->isa('PPI::Token::Whitespace') || $_->isa('PPI::Token::Operator')
24840
ABdec
0X0
100
111
$k and $v
24900
ABdec
0X0
100
111
$keyname =~ /^(min|max)$/ and &looks_like_number($value)
25010
Adec
00
11
$param{'type'} //= "string"
25020
Adec
00
11
$param{'optional'} //= 0
254333
ABdec
0X0
100
111
ref $code and $code->can("find")
2545100
Adec
00
11
$self->{'_ppi_cache'} ||= {}
254633
ABdec
000
011
1X1
$self->{'_ppi_cache'}{$code} //= "PPI::Document"->new(\$code)
2574100
ABdec
000
011
1X1
$_[1]->content eq "validate_strict" or $_[1]->content eq "Params::Validate::Strict::validate_strict"
257967
ABdec
0X0
100
111
$list and not $list->isa("PPI::Structure::List")
2638100
ABdec
000
011
1X1
$_[1]->content eq "validate" or $_[1]->content eq "Params::Validate::validate"
264367
ABdec
0X0
100
111
$list and not $list->isa("PPI::Structure::List")
272467
ABdec
0X0
100
111
$char eq "," and $depth == 0
277867
ABdec
0X0
100
111
$list and not $list->isa("PPI::Structure::List")
286667
ABdec
0X0
100
111
$block and $block->can("children")
28700
ABCdec
0XX0
10X0
1100
1111
$result and ref $result eq "HASH" and $result->{'input'}
31790
ABdec
0X0
100
111
$stderr and length $stderr
3229100
Adec
00
11
$type_map{$p->{'type'}} // "string"
324850
Adec
00
11
$type_map{$ret->{'type'}} // "string"
332033
ABdec
0X0
100
111
@sig_params and $sig_params[0] =~ /^(self|class)$/i
332433
ABdec
000
011
1X1
$params{$param}{'position'} //= $position_counter
335467
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
3364100
Adec
00
11
$params{$name} ||= {"_source", "pod"}
337433
ABdec
000
011
1X1
$type eq "num" or $type eq "float"
3387100
Adec
00
11
$desc || ''
100
Adec
00
11
$constraint || ''
3404100
ABdec
0X0
100
111
$desc and $desc =~ m[matches?\s+(/[^/]+/|qr/.+?/)]i
342850
Adec
00
11
$params{$name} ||= {"_source", "pod"}
343233
ABdec
000
011
1X1
$type eq "num" or $type eq "float"
346833
ABdec
0X0
100
111
defined $name and length $name
347550
Adec
00
11
$params{$name} ||= {"_source", "pod"}
34850
ABdec
000
011
1X1
$type eq "num" or $type eq "float"
365733
ABdec
0X0
100
111
defined $output->{'type'} and $output->{'type'} eq "scalar"
366050
Adec
00
11
$output->{'type'} ||= "boolean"
367050
Adec
00
11
$output->{'type'} ||= "boolean"
3678100
ABdec
0X0
100
111
not $output->{'type'} and $pod =~ /returns?\s+(?:an?\s+)?(\w+)/i
36890
ABdec
000
011
1X1
$type eq 1 or $type eq 0
370333
ABdec
0X0
100
111
not $type and $pod =~ /returns?\s+.+\slist\b/i
383267
ABdec
0X0
100
111
$boolean_count >= 2 and $boolean_count >= $total_count * "0.8"
3842100
ABdec
0X0
100
111
$code =~ /return\s+\$self\s*;/ and $code =~ /\$self\s*->\s*\{[^}]+\}\s*=/
38470
ABdec
0X0
100
111
$self->{'_document'} and my $package_stmt = $self->{'_document'}->find_first("PPI::Statement::Package")
38490
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
38740
Adec
00
11
$output->{'isa'} || 'UNKNOWN'
38750
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
388850
Adec
00
11
$output->{'isa'} || 'UNKNOWN'
388933
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
391367
ABdec
0X0
100
111
$ret =~ /=/ and $ret =~ /\$\w+/
100
ABdec
000
011
1X1
$ret eq 1 or $ret eq 0
398767
ABdec
0X0
100
111
$return_types{'integer'} and not $return_types{'string'}
398833
ABdec
000
011
1X1
not $output->{'type'} or $output->{'type'} eq "scalar"
399150
Adec
00
11
$output->{'_type_confidence'} ||= "low"
400250
Adec
00
11
$output->{'_type_confidence'} ||= "medium"
4013100
ABdec
0X0
100
111
@return_statements == 1 and $return_statements[0] eq 1
401533
ABdec
000
011
1X1
not $output->{'type'} or $output->{'type'} eq "scalar"
405767
ABdec
000
011
1X1
not $output->{'type'} or $output->{'type'} eq "unknown"
406067
ABdec
0X0
100
111
$pod and not $output->{'type'}
412020
ABCDdec
00000
00011
001X1
01XX1
1XXX1
not $output->{'type'} or $output->{'type'} eq "scalar" or $output->{'type'} eq "array" or $output->{'type'} eq "undef"
412150
Adec
00
11
$output->{'type'} || 'none'
419750
ABCdec
0000
0011
01X1
1XX1
$char eq "(" or $char eq "[" or $char eq "{"
419850
ABCdec
0000
0011
01X1
1XX1
$char eq ")" or $char eq "]" or $char eq "}"
419967
ABdec
0X0
100
111
$char eq "," and $depth == 0
420233
ABdec
0X0
100
111
$comma_count > 0 and not $content =~ /\b(?:bless|new)\b/
420467
ABdec
0X0
100
111
$output->{'type'} and $output->{'type'} eq "boolean"
4288100
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
4296100
ABdec
0X0
100
111
$output->{'type'} and $output->{'type'} eq "boolean"
434067
ABdec
0X0
100
111
$self_returns > 0 and $total_returns > 0
435133
ABdec
000
011
1X1
$self->{'_package_name'} //= $output->{'isa'}
442067
ABdec
0X0
100
111
$zero_returns > 0 and $one_returns > 0
443767
ABdec
000
011
1X1
/^\s*undef\s*$/ || /^\s*$/
443950
ABCdec
0XX0
10X0
1100
1111
$has_undef and $has_value and scalar @all_returns >= 2
4506100
ABdec
0X0
100
111
$char eq "," and $depth == 0
451575
ABCdec
0000
0011
01X1
1XX1
$expr =~ /^\@\w+/ or $expr =~ /^qw\(/ or $expr =~ /^\@\{/
4525100
ABdec
000
011
1X1
$expr =~ /^\[/ or $expr =~ /^\\\@/
4530100
ABdec
000
011
1X1
$expr =~ /^\{/ or $expr =~ /^\\\%/
453533
ABdec
000
011
1X1
$expr =~ /^\%\w+/ or $expr =~ /^\%\{/
454067
ABdec
000
011
1X1
$expr =~ /^['"]/ or $expr =~ /['"]$/
459580
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
4627100
ABCdec
0XX0
10X0
1100
1111
defined $output->{'type'} and $output->{'type'} eq "boolean" and not defined $output->{'value'}
463050
ABCdec
0XX0
10X0
1100
1111
$output->{'value'} and defined $output->{'type'} and $output->{'type'} ne "boolean"
468667
ABdec
0X0
100
111
$param->{'type'} and $param->{'type'} eq "integer"
468767
ABdec
0X0
100
111
$param->{'type'} and $param->{'type'} eq "number"
4759100
ABdec
0X0
100
111
$params{$param}{'_default'} and not $params{$param}{'type'}
481450
Adec
00
11
$$p->{'type'} //= "number"
48190
Adec
00
11
$$p->{'type'} //= "number"
490467
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/
4912100
ABdec
0X0
100
111
not $p->{'type'} and exists $p->{'_default'}
4928100
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*\)/
502033
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
504133
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)/
506950
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*\)/
508033
ABdec
000
011
1X1
$code =~ /strptime\s*\(\s*\$$param/ or $code =~ /DateTime::Format::\w+\s*->\s*parse_datetime\s*\(\s*\$$param/
511333
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
514233
ABdec
000
011
1X1
$code =~ /File::(?:Spec|Basename)::\w+\s*\(\s*\$$param/ or $code =~ /(?:basename|dirname|fileparse)\s*\(\s*\$$param/
515267
ABdec
0X0
100
111
defined $p->{'_default'} and $p->{'_default'} =~ m[^([A-Za-z]:\\|/|\./|\.\./)]
516033
ABdec
000
011
1X1
$code =~ /\$$param\s*->\s*isa\s*\(\s*['"]IO::File['"]\s*\)/ or $code =~ /IO::File\s*->\s*new\s*\(\s*\$$param/
519333
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
520450
ABCdec
0000
0011
01X1
1XX1
$code =~ /\$$param\s*->\s*\(/ or $code =~ /\$$param\s*->\s*\(\s*\@_\s*\)/ or $code =~ /&\s*\{\s*\$$param\s*\}/
522233
ABdec
0X0
100
111
$code =~ /blessed\s*\(\s*\$$param\s*\)/ and $code =~ /ref\s*\(\s*\$$param\s*\)\s*eq\s*['"]CODE['"]/i
526133
ABdec
0X0
100
111
defined $param and $param =~ /^\w+$/
528167
ABdec
0X0
100
111
defined $values_str and $code =~ /\$$hash_name\s*\{\s*\$$param\s*\}/
533733
ABdec
000
011
1X1
$code =~ /\$$param\s*~~\s*\[([^\]]+)\]/ or $code =~ /\$$param\s*~~\s*qw\s*[\(\[<{]([^)\]>}]+)[\)\]>}]/
539667
ABdec
000
011
1X1
$1 || $2
5403100
Adec
00
11
$$p->{'_invalid'} ||= []
5404100
Adec
00
11
$$p->{'_errors'} ||= []
551950
Adec
00
11
$params->{$name} //= {"_source", "code", "optional", 1}
553533
ABdec
0X0
100
111
@shifts and $shifts[0] =~ /^(self|class)$/i
553850
Adec
00
11
$params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++}
55500
Adec
00
11
$params->{$param} ||= {"_source", "code", "optional", 1, "position", $pos++}
559325
ABCdec
0000
0011
01X1
1XX1
$char eq "(" or $char eq "[" or $char eq "{"
25
ABCdec
0000
0011
01X1
1XX1
$char eq ")" or $char eq "]" or $char eq "}"
67
ABdec
0X0
100
111
$char eq "," and $depth == 0
579133
ABdec
000
011
1X1
$default eq 1 or $default eq 0
584767
ABdec
0X0
100
111
defined $value and $value ne ""
605850
Adec
00
11
$params->{$param_name} ||= {}
617850
Adec
00
11
$params->{$param} ||= {}
621850
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"
62250
Adec
00
11
$params->{$var} ||= {"position", $position++}
623425
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"
62410
Adec
00
11
$params->{$var} ||= {"position", $position++}
624925
ABCdec
0000
0011
01X1
1XX1
$var ne "class" or $position > 0 or $method->{'name'} ne "new"
625050
Adec
00
11
$params->{$var} ||= {"position", $index}
632150
Adec
00
11
$p->{'type'} ||= "string"
6335100
ABdec
0X0
100
111
not $guarded and $code =~ /\$$param\s*([<>]=?)\s*([+-]?(?:\d+\.?\d*|\.\d+))/
634033
ABdec
000
011
1X1
$p->{'type'} ||= &looks_like_number($val) ? "number" : "integer"
634267
ABdec
000
011
1X1
$op eq ">" or $op eq ">="
67
ABdec
000
011
1X1
$op eq "<" or $op eq "<="
634533
ABdec
000
011
1X1
not defined $p->{'max'} or $max < $p->{'max'}
634833
ABdec
000
011
1X1
not defined $p->{'min'} or $min > $p->{'min'}
635550
Adec
00
11
$p->{'type'} ||= "string"
6405100
ABdec
0X0
100
111
defined $default_value and not exists $p->{'_default'}
64110
ABdec
0X0
100
111
defined $default_value and not ref $default_value
6429100
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'}
643233
ABdec
000
011
1X1
$assignment =~ /\$$param/ or $assignment =~ /^shift/
6499100
ABdec
0X0
100
111
$pod->{$param} and defined $pod->{$param}{'position'}
650033
ABdec
0X0
100
111
$sig->{$param} and defined $sig->{$param}{'position'}
6501100
ABdec
0X0
100
111
$code->{$param} and defined $code->{$param}{'position'}
652483
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"
65370
ABdec
000
011
1X1
$p->{$key} //= $sig->{$param}{$key}
655050
Adec
00
11
$merged{$b}{'position'} || 999
50
Adec
00
11
$merged{$a}{'position'} || 999
655550
Adec
00
11
$p->{'type'} || 'none'
100
Adec
00
11
$p->{'position'} || 'none'
6653100
ABCdec
0XX0
1000
1011
11X1
$p->{'type'} eq "string" and $p->{'min'} || $p->{'max'} || $p->{'matches'}
6850100
ABdec
0X0
100
111
$output->{'_error_handling'} and $output->{'_error_handling'}{'exception_handling'}
690650
Adec
00
11
$schema->{'method_name'} || 'method'
7172100
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/
717833
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
719767
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
720233
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
7255100
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/
726133
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
728167
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
728633
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
741267
ABdec
0X0
100
111
$code =~ /(?:die|croak|confess)\s+['"]\w*${param1}[^'"]*requires[^'"]*$param2/i and $code =~ /if\s+\$param1\s+&&\s+!\$param2/
753433
ABdec
000
011
1X1
$self->{'_package_name'} //= $package_name
757550
Adec
00
11
$schema->{'output'} and scalar keys %{$$schema{"output"};}
757667
ABdec
0X0
100
111
ref $schema->{'output'}{'_error_handling'} eq "HASH" and scalar keys %{$$schema{"output"}{"_error_handling"};} == 0
758267
ABdec
0X0
100
111
$schema->{'output'}{'type'} and $schema->{'output'}{'type'} eq "scalar"
759033
ABdec
000
011
1X1
ref $schema->{'new'} or $schema->{'new'} eq $package_name
760767
ABdec
0X0
100
111
$schema->{'relationships'} and @{$schema->{'relationships'};}
7611100
Adec
00
11
$schema->{'accessor'} and scalar keys %{$$schema{"accessor"};}
769067
ABdec
0X0
100
111
$schema->{'relationships'} and @{$schema->{'relationships'};}
769633
ABdec
000
011
1X1
$rel->{'description'} || _format_relationship($rel)
770250
Adec
00
11
$schema->{'_notes'} and scalar @{$schema->{'_notes'};}
773467
ABdec
0X0
100
111
$p->{'type'} and $p->{'type'} eq "coderef"
7738100
ABdec
0X0
100
111
$p->{'semantic'} and $p->{'semantic'} eq "filehandle"
7742100
ABdec
0X0
100
111
$p->{'isa'} and $p->{'isa'} =~ /DateTime/
780350
Adec
00
11
$param->{'isa'} || 'DateTime'
78070
Adec
00
11
$param->{'isa'} || 'Time::Piece'
781250
Adec
00
11
$cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}\$/"
781650
Adec
00
11
$cleaned{'matches'} ||= "/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z?\$/"
782050
Adec
00
11
$cleaned{'min'} ||= 0
782167
ABdec
000
011
1X1
$cleaned{'max'} ||= $INT32_MAX
782950
Adec
00
11
$param->{'isa'} || 'IO::Handle'
783450
Adec
00
11
$cleaned{'matches'} ||= "/^[\\w\\/.\\-_]+\$/"
784333
ABdec
0X0
100
111
$param->{'enum'} and ref $param->{'enum'} eq "ARRAY"
785167
ABdec
0X0
100
111
$param->{'enum'} and ref $param->{'enum'} eq "ARRAY"
785433
ABdec
0X0
100
111
$param->{'memberof'} and ref $param->{'memberof'} eq "ARRAY"
7859100
ABdec
0X0
100
111
$param->{'isa'} and not $cleaned{'isa'}
794550
Adec
00
11
$method_info ||= {}
795367
ABdec
000
011
1X1
$self->{'_package_name'} //= $current_package
7995100
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'}
801567
ABdec
0X0
100
111
$inheritance_info and $inheritance_info->{'use_parent_constructor'}
8055100
ABdec
0X0
100
111
$is_factory and not $skip_object
810467
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
8123100
ABdec
000
011
1X1
$method_body =~ /return\s+([\$\w:]+)->new\(/s or $method_body =~ /([\$\w:]+)->new\(.*return/s
812825
ABCdec
0000
0011
01X1
1XX1
$target eq "\$self" or $target eq "shift" or $target =~ /^\$/
814433
ABdec
000
011
1X1
$method_body =~ /return\s+([\$\w:]+)->(create_|make_|build_|get_)/i or $method_body =~ /([\$\w:]+)->(create_|make_|build_|get_).*return/is
815350
ABCdec
0XX0
10X0
1100
1111
$method_info and ref $method_info eq "HASH" and $method_info->{'pod'}
820467
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
821167
ABdec
000
011
1X1
$method_body =~ /return\s+\$instance\s+if\s+(?:defined\s+)?\$instance/ or $method_body =~ /unless\s+\$instance.*?=\s*.*?new/
821867
ABdec
000
011
1X1
$method_body =~ /\$instance\s*\|\|=\s*.*?new/ or $method_body =~ /\$instance\s*=\s*.*?new\s+unless\s+(?:defined\s+)?\$instance/
830067
ABdec
0X0
100
111
$method_name =~ /^_/ and not $method_name =~ /^_new/
8347100
Adec
00
11
$doc->find('PPI::Statement::Include') || []
8364100
Adec
00
11
$doc->find('PPI::Statement::Variable') || []
837750
Adec
00
11
$doc->find('PPI::Statement') || []
8389100
ABdec
0X0
100
111
$method_body and $method_body =~ /SUPER::/
856850
ABCdec
0000
0011
01X1
1XX1
$class eq "main" or $class eq "__PACKAGE__" or $class =~ /^\$/
863350
ABCdec
0XX0
10X0
1100
1111
$_[1]->isa("PPI::Statement::Include") and $_[1]->type eq "use" and $_[1]->module =~ /^(parent|base)$/
864833
ABdec
0X0
100
111
$isa_stmt and $isa_stmt->content =~ /['"](\w+(?:::\w+)*)['"]/
868433
ABdec
000
011
1X1
$self->{'_package_name'} //= $package_name
873333
ABdec
0X0
100
111
$param and $code
8879100
ABdec
000
011
1X1
$code =~ /\beq\s*''/ or $code =~ /\blength\s*\(/
8997100
Adec
00
11
$hints->{'valid_inputs'} ||= []
9004100
Adec
00
11
$hints->{$k} //= []
9142100
ABdec
000
011
1X1
$value =~ /^\$[a-zA-Z_]/ or $value =~ /\(.*\)/
9189100
Adec
00
11
$pod_params->{$param} || {}
9190100
Adec
00
11
$code_params->{$param} || {}
9193100
ABdec
0X0
100
111
exists $pod_params->{$param} and not exists $code_params->{$param}
919867
ABdec
0X0
100
111
not exists $pod_params->{$param} and exists $code_params->{$param}
919967
ABdec
0X0
100
111
$method_name eq "new" and $param eq "class"
920367
ABdec
0X0
100
111
$method_name ne "new" and $param eq "self"
921275
ABCdec
0XX0
10X0
1100
1111
$pod->{'type'} and $code->{'type'} and $pod->{'type'} ne $code->{'type'}
922150
ABCdec
0XX0
10X0
1100
1111
exists $pod->{'optional'} and exists $code->{'optional'} and $pod->{'optional'} != $code->{'optional'}
922925
ABCdec
0XX0
10X0
1100
1111
defined $pod->{'min'} and defined $code->{'min'} and $pod->{'min'} != $code->{'min'}
923325
ABCdec
0XX0
10X0
1100
1111
defined $pod->{'max'} and defined $code->{'max'} and $pod->{'max'} != $code->{'max'}
923825
ABCdec
0XX0
10X0
1100
1111
$pod->{'matches'} and $code->{'matches'} and $pod->{'matches'} ne $code->{'matches'}