| line | % | coverage | condition |
| 516 | 100 | | $$params{"expires_in"} and not $$params{"cache_duration"} |
| 522 | 100 | | $defaults{"cache_duration"} ||= "1 hour" |
| 544 | 33 | | scalar @_ == 1 and ref $_[0] eq "HASH" |
| 67 | | scalar @_ == 0 and ref $pkg eq "HASH" |
| 793 | 100 | | scalar @_ == 1 and not ref $_[0] |
| 830 | 33 | | defined $args{"logger"} and not &Scalar::Util::blessed($args{"logger"}) |
| 834 | 57 | | A | B | C | D | E | F | dec |
|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | 0 | 1 | 1 | | 0 | 0 | 0 | 0 | 1 | X | 1 | | 0 | 0 | 0 | 1 | X | X | 1 | | 0 | 0 | 1 | X | X | X | 1 | | 0 | 1 | X | X | X | X | 1 | | 1 | X | X | X | X | X | 1 |
| $args{"dsn"} or $defaults{"dsn"} or $args{"url"} or $defaults{"url"} or $args{"database"} or $defaults{"database"} |
| 835 | 100 | | $args{"directory"} or $defaults{"directory"} |
| 839 | 67 | | $args{"host"} // $defaults{"host"} |
| 840 | 100 | | $given_host and not $class->_is_local_host($given_host) |
| 841 | 67 | | $args{'directory'} || $defaults{'directory'} |
| 33 | | $args{'directory'} || $defaults{'directory'} |
| 880 | 33 | | defined $$src{"redis_key"} and not defined $$src{"database"} |
| 946 | 0 | | defined $db_num and $db_num =~ /\A\d+\z/ |
| 1694 | 33 | | defined $cols or $distinct |
| 1695 | 33 | | defined $rows and @{$rows;} |
| 1832 | 100 | | Params::Get::get_params(undef, \@_) // {} |
| 1838 | 33 | | defined $bl and not $bl =~ /\A\d+\z/ |
| 1842 | 33 | | defined $bo and not $bo =~ /\A\d+\z/ |
| 1850 | 0 | | $$a{$bsc} // "" |
| 0 | | $$b{$bsc} // "" |
| 1852 | 0 | | $$b{$bsc} // "" |
| 0 | | $$a{$bsc} // "" |
| 1855 | 33 | | defined $bl or defined $bo |
| 1859 | 33 | | $bcols or $bdist |
| 1871 | 100 | | $params //= {} |
| 1908 | 67 | | defined $c and $c =~ /$SAFE_QUALIFIED/ |
| 1920 | 100 | | not $join_clause and $$self{"data"} and not $self->_has_complex_criteria($params) |
| 1921 | 67 | | ref $$self{"data"} eq "ARRAY" and not $$self{$table} |
| 75 | | scalar keys %{$params;} == 1 and defined $$params{"entry"} and not $$self{"no_entry"} |
| 1935 | 50 | | $$a{$sort_col} // "" |
| 50 | | $$b{$sort_col} // "" |
| 1937 | 100 | | $$b{$sort_col} // "" |
| 50 | | $$a{$sort_col} // "" |
| 1940 | 100 | | defined $offset or defined $limit |
| 1955 | 0 | | $$a{$sort_col} // "" |
| 0 | | $$b{$sort_col} // "" |
| 1957 | 0 | | $$b{$sort_col} // "" |
| 0 | | $$a{$sort_col} // "" |
| 1960 | 33 | | defined $offset or defined $limit |
| 1980 | 0 | | $$a{$sort_col} // "" |
| 0 | | $$b{$sort_col} // "" |
| 1982 | 0 | | $$b{$sort_col} // "" |
| 0 | | $$a{$sort_col} // "" |
| 1985 | 33 | | defined $offset or defined $limit |
| 1989 | 67 | | $columns or $distinct |
| 2002 | 0 | | $$a{$sort_col} // "" |
| 0 | | $$b{$sort_col} // "" |
| 2004 | 0 | | $$b{$sort_col} // "" |
| 0 | | $$a{$sort_col} // "" |
| 2007 | 33 | | defined $offset or defined $limit |
| 2011 | 33 | | $columns or $distinct |
| 2019 | 50 | | $$self{"type"} // "" |
| 2038 | 100 | | $$self{"type"} eq "CSV" and not $$self{"no_entry"} |
| 2060 | 0 | | $$self{"_dialect"} // "" |
| 0 | | A | B | C | dec |
|---|
| 0 | X | 0 | 0 | | 0 | X | 1 | 1 | | 1 | 0 | 0 | 0 | | 1 | 0 | 1 | 1 | | 1 | 1 | X | 1 |
| $dbh and ($$dbh{"Driver"}{"Name"} // "") eq "SQLite" or ($$self{"_dialect"} // "") eq "sqlite" |
| 0 | | $$dbh{"Driver"}{"Name"} // "" |
| 2105 | 100 | | $rc and not $$self{"no_fixate"} |
| 2188 | 0 | | Params::Get::get_params(undef, \@_) // {} |
| 2192 | 0 | | defined $bl and not $bl =~ /\A\d+\z/ |
| 2196 | 0 | | defined $bo and not $bo =~ /\A\d+\z/ |
| 2204 | 0 | | $$a{$bsc} // "" |
| 0 | | $$b{$bsc} // "" |
| 2206 | 0 | | $$b{$bsc} // "" |
| 0 | | $$a{$bsc} // "" |
| 2209 | 0 | | defined $bl or defined $bo |
| 2230 | 100 | | $params //= {} |
| 2259 | 50 | | not $join_clause and $$self{"data"} and not $self->_has_complex_criteria($params) |
| 2261 | 0 | | ref $$self{"data"} eq "ARRAY" and not $$self{$table} |
| 50 | | scalar keys %{$params;} == 1 and defined $$params{"entry"} and not $$self{"no_entry"} |
| 2284 | 100 | | $$a{$sort_col} // "" |
| 50 | | $$b{$sort_col} // "" |
| 2286 | 50 | | $$b{$sort_col} // "" |
| 50 | | $$a{$sort_col} // "" |
| 2289 | 100 | | defined $offset or defined $limit |
| 2308 | 67 | | $$self{"type"} eq "CSV" and not $$self{"no_entry"} |
| 2329 | 0 | | $$self{"_dialect"} // "" |
| 0 | | A | B | C | dec |
|---|
| 0 | X | 0 | 0 | | 0 | X | 1 | 1 | | 1 | 0 | 0 | 0 | | 1 | 0 | 1 | 1 | | 1 | 1 | X | 1 |
| $dbh and ($$dbh{"Driver"}{"Name"} // "") eq "SQLite" or ($$self{"_dialect"} // "") eq "sqlite" |
| 0 | | $$dbh{"Driver"}{"Name"} // "" |
| 2385 | 50 | | Params::Get::get_params(undef, \@_) // {} |
| 2389 | 33 | | defined $bl and not $bl =~ /\A\d+\z/ |
| 2393 | 33 | | defined $bo and not $bo =~ /\A\d+\z/ |
| 2401 | 0 | | $$a{$bsc} // "" |
| 0 | | $$b{$bsc} // "" |
| 2403 | 0 | | $$b{$bsc} // "" |
| 0 | | $$a{$bsc} // "" |
| 2406 | 33 | | defined $bl or defined $bo |
| 2416 | 100 | | $params //= {} |
| 2444 | 75 | | not $join_clause and $$self{"data"} and not $self->_has_complex_criteria($params) |
| 2445 | 0 | | ref $$self{"data"} eq "ARRAY" and not $$self{$table} |
| 50 | | scalar keys %{$params;} == 1 and defined $$params{"entry"} and not $$self{"no_entry"} |
| 2452 | 0 | | $$a{$sort_col} // "" |
| 0 | | $$b{$sort_col} // "" |
| 2454 | 0 | | $$b{$sort_col} // "" |
| 0 | | $$a{$sort_col} // "" |
| 2457 | 33 | | defined $offset or defined $limit |
| 2466 | 33 | | defined $offset or defined $limit |
| 2488 | 0 | | $$a{$sort_col} // "" |
| 0 | | $$b{$sort_col} // "" |
| 2490 | 0 | | $$b{$sort_col} // "" |
| 0 | | $$a{$sort_col} // "" |
| 2493 | 33 | | defined $offset or defined $limit |
| 2509 | 0 | | $$a{$sort_col} // "" |
| 0 | | $$b{$sort_col} // "" |
| 2511 | 0 | | $$b{$sort_col} // "" |
| 0 | | $$a{$sort_col} // "" |
| 2514 | 0 | | defined $offset or defined $limit |
| 2527 | 100 | | $$self{"type"} eq "CSV" and not $$self{"no_entry"} |
| 2560 | 0 | | $$self{"_dialect"} // "" |
| 0 | | A | B | C | dec |
|---|
| 0 | X | 0 | 0 | | 0 | X | 1 | 1 | | 1 | 0 | 0 | 0 | | 1 | 0 | 1 | 1 | | 1 | 1 | X | 1 |
| $dbh and ($$dbh{"Driver"}{"Name"} // "") eq "SQLite" or ($$self{"_dialect"} // "") eq "sqlite" |
| 0 | | $$dbh{"Driver"}{"Name"} // "" |
| 2669 | 100 | | Params::Get::get_params(undef, \@_) // {} |
| 2676 | 50 | | $params // {} |
| 2679 | 67 | | $self->_has_complex_criteria($params) || $$self{$table} |
| 75 | | scalar keys %{$params;} == 1 and defined $$params{"entry"} and not $$self{"no_entry"} |
| 2687 | 67 | | exists $$self{'data'}{$$params{'entry'}} && $$self{'data'}{$$params{'entry'}} |
| 2709 | 100 | | $$self{"type"} eq "CSV" and not $$self{"no_entry"} |
| 2827 | 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 | X | 0 | | 1 | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 | 1 |
| $$self{"data"} and not $$self{"no_entry"} and scalar keys %{$params;} == 1 and defined $$params{"entry"} and not $self->_has_complex_criteria($params) |
| 2839 | 25 | | not $$self{"no_entry"} and scalar keys %{$params;} == 1 and defined $$params{"entry"} |
| 2843 | 20 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 |
| $$self{"no_entry"} and scalar keys %{$params;} == 1 and defined $id and defined $$params{$id} |
| 2858 | 33 | | $raw_target // $table |
| 2867 | 100 | | $$self{"type"} eq "CSV" and not $$self{"no_entry"} |
| 3020 | 100 | | $$self{"_dialect"} // "" |
| 3022 | 33 | | defined $dsn and $dsn =~ /\Adbi:SQLite:(?:dbname=)?(.+)\z/i |
| 3088 | 33 | | ref $data eq "ARRAY" and @{$data;} |
| 3196 | 33 | | ref $data eq "ARRAY" and @{$data;} |
| 3198 | 67 | | $$self{"infer_types"} and $first |
| 3227 | 50 | | $$self{$table}{"Driver"}{"Name"} // "" |
| 3293 | 50 | | $$dbh{"Driver"}{"Name"} // "" |
| 75 | | $dbh and ref $dbh and ($$dbh{"Driver"}{"Name"} // "") eq "SQLite" |
| 3416 | 100 | | $params //= {} |
| 3430 | 100 | | $join_clause and not $$self{$table} |
| 3431 | 50 | | $$self{"type"} // "slurp" |
| 3440 | 100 | | $$self{$table} and not $has_perl_only |
| 3481 | 50 | | not defined $$row{$as} and $fn eq 'sum' || $fn eq 'count' || $fn eq 'count_distinct' |
| 3509 | 50 | | $$b{$scol} // "" |
| 50 | | $$a{$scol} // "" |
| 3518 | 50 | | $$b{$bn} // "" |
| 50 | | $$a{$bn} // "" |
| 3547 | 100 | | $by //= [] |
| 3553 | 100 | | defined $col and $col =~ /$SAFE_QUALIFIED/ |
| 100 | | $col // "" |
| 3560 | 100 | | ref $meas eq "ARRAY" and scalar @{$meas;} > 0 |
| 3564 | 100 | | ref $m || 'scalar' |
| 3567 | 100 | | $$m{"fn"} // "" |
| 3575 | 100 | | defined $col and length $col |
| 3578 | 67 | | defined $col and length $col |
| 3583 | 100 | | defined $as and length $as |
| 3595 | 100 | | $fn eq "count" and not defined $col && length $col |
| 67 | | defined $col && length $col |
| 3614 | 100 | | $k eq "-or" or $k eq "-and" |
| 3616 | 100 | | $by_name_set{$k} or $alias_set{$k} |
| 3627 | 100 | | $sort_col // "" |
| 100 | | defined $sort_col and $by_name_set{$sort_col} || $alias_set{$sort_col} |
| 3628 | 100 | | $sort_dir eq "ASC" or $sort_dir eq "DESC" |
| 50 | | $sort_col // "" |
| 3682 | 67 | | ($$self{"type"} // "") eq "CSV" and not $$self{"no_entry"} |
| 50 | | $$self{"type"} // "" |
| 3721 | 0 | | $$self{"_dialect"} // "" |
| 20 | | A | B | C | dec |
|---|
| 0 | X | 0 | 0 | | 0 | X | 1 | 1 | | 1 | 0 | 0 | 0 | | 1 | 0 | 1 | 1 | | 1 | 1 | X | 1 |
| $dbh and ($$dbh{"Driver"}{"Name"} // "") eq "SQLite" or ($$self{"_dialect"} // "") eq "sqlite" |
| 50 | | $$dbh{"Driver"}{"Name"} // "" |
| 3753 | 67 | | $agg_expr // $k |
| 3763 | 100 | | $op eq "-in" or $op eq "-not_in" |
| 3853 | 67 | | $col && $$self{'_schema'} |
| 3854 | 0 | | ($$self{"_schema"}{$col} // {})->{"type"} // "TEXT" |
| 0 | | $$self{"_schema"}{$col} // {} |
| 3855 | 0 | | $t eq 'INTEGER' || $t eq 'REAL' |
| 3865 | 100 | | $$row{$$_{"name"}} // "" |
| 3880 | 67 | | $fn eq "median" or $fn eq "stddev" |
| 100 | | $fn eq "min" or $fn eq "max" |
| 3905 | 67 | | defined $col && exists $row->{$col} |
| 3907 | 67 | | $fn eq "median" or $fn eq "stddev" |
| 3908 | 40 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 |
| defined $val and length $val and &Scalar::Util::looks_like_number($val) |
| 3912 | 67 | | $$acc{"first_bad"} //= $val |
| 3915 | 60 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 |
| defined $val and length $val and &Scalar::Util::looks_like_number($val) |
| 3920 | 33 | | $$acc{"first_bad"} //= $val |
| 3947 | 0 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 |
| defined $val and length $val and &Scalar::Util::looks_like_number($val) |
| 3951 | 0 | | $$acc{"first_bad"} //= $val |
| 3973 | 100 | | $fn eq "min" or $fn eq "max" |
| 3974 | 67 | | $$acc{"bad"} and not $warned{$as}++ |
| 3979 | 67 | | $$acc{"bad"} and not $warned{$as}++ |
| 3990 | 33 | | $$acc{"bad"} and not $warned{$as}++ |
| 4003 | 33 | | $$acc{"bad"} and not $warned{$as}++ |
| 4114 | 67 | | exists $self->{'auto_load'} and not $$self{"auto_load"} |
| 4128 | 33 | | $$self{"no_entry"} and not $$self{"berkeley"} |
| 4144 | 100 | | delete $params{'distinct'} || delete $params{'unique'} |
| 4146 | 100 | | wantarray and not $distinct |
| 4147 | 100 | | scalar keys %params == 0 and my $data = $$self{"data"} |
| 4155 | 50 | | $$self{"data"} and not $$self{$table} and not $self->_has_complex_criteria(\%params) |
| 4166 | 67 | | $$self{"type"} eq "CSV" and not $$self{"no_entry"} |
| 4177 | 100 | | scalar keys %params == 1 and defined(my $key = $params{"entry"}) |
| 4184 | 50 | | exists $row->{$key} and defined $$row{$key} and $$row{$key} eq $value |
| 4196 | 67 | | exists $data->{$key} and defined(my $hash = $$data{$key}) |
| 4233 | 75 | | exists $row->{$key} and defined $$row{$key} and $$row{$key} eq $value |
| 4245 | 100 | | $$self{"type"} eq "CSV" and not $$self{"no_entry"} |
| 4274 | 67 | | scalar @args and $args[0] |
| 4298 | 33 | | $$self{$table}->prepare_cached($query) || croak($query) |
| 4308 | 33 | | scalar @rc and not $$self{"no_fixate"} |
| 4322 | 33 | | defined $^V and $^V ge "v5.14.0" |
| 4336 | 100 | | defined $temp_path and -f $temp_path |
| 4346 | 67 | | $$self{'table'} || ref $self |
| 4378 | 100 | | $$j{"type"} // "INNER" |
| 4430 | 100 | | defined $col and $col =~ /$SAFE_QUALIFIED/ |
| 4434 | 100 | | $dir eq "ASC" or $dir eq "DESC" |
| 4448 | 100 | | exists $params->{'-or'} or exists $params->{'-and'} |
| 4498 | 50 | | $params //= {} |
| 4509 | 100 | | defined $or_list or defined $and_list |
| 4575 | 100 | | $op eq "-in" or $op eq "-not_in" |
| 4630 | 50 | | $params //= {} |
| 4697 | 100 | | index($lc_pat, "%") == -1 and index($lc_pat, "_") == -1 |
| 4707 | 100 | | $first_pct == 0 and $last_pct == 0 |
| 4710 | 67 | | $str_len >= $sfx_len && substr($lc_str, $str_len - $sfx_len) eq $sfx |
| 4715 | 100 | | $last_pct == $pat_len - 1 and $first_pct == $pat_len - 1 |
| 4724 | 75 | | $first_pct == 0 and $last_pct == $pat_len - 1 and $pat_len >= 3 |
| 4748 | 100 | | $$prev[$j] || $$curr[$j - 1] |
| 4752 | 100 | | $$prev[$j - 1] && ($pc eq '_' || $pc eq substr($lc_str, $j - 1, 1)) |
| 4770 | 50 | | ($$self{"_schema"}{$col} // {})->{"type"} // "TEXT" |
| 100 | | $col && $$self{'_schema'} |
| 50 | | $$self{"_schema"}{$col} // {} |
| 4781 | 100 | | defined $row_val and $numeric ? grep({$row_val == $_;} @{$operand;}) : grep({$row_val eq $_;} @{$operand;}) |
| 4786 | 67 | | defined $row_val and $numeric ? grep({$row_val == $_;} @{$operand;}) : grep({$row_val eq $_;} @{$operand;}) |
| 4788 | 100 | | defined $row_val and $row_val >= $$operand[0] and $row_val <= $$operand[1] |
| 4799 | 67 | | defined $row_val and $row_val != $operand |
| 4801 | 100 | | defined $row_val and $row_val ne $operand |
| 4804 | 67 | | defined $row_val and $row_val > $operand |
| 4806 | 67 | | defined $row_val and $row_val < $operand |
| 4808 | 67 | | defined $row_val and $row_val >= $operand |
| 4810 | 67 | | defined $row_val and $row_val <= $operand |
| 4816 | 100 | | defined $row_val && defined $crit_val |
| 100 | | defined $row_val || defined $crit_val |
| 4836 | 67 | | $$self{"_table_name"} //= do {
my $t = $$self{'table'} || ref $self;
$t =~ s/\A.*:://;
$t
} |
| 4837 | 67 | | $$self{'table'} || ref $self |
| 4846 | 100 | | $$self{$table} or $$self{"data"} or $$self{"berkeley"} |
| 4857 | 33 | | $$self{'table'} || ref $self |
| 4903 | 100 | | $magic{unpack "N", $buf} or $magic{unpack "V", $buf} |
| 4909 | 67 | | $hex12 eq '6115' || $hex12 eq '1561' |
| 4948 | 67 | | defined $n and $n == 4 |
| 4950 | 100 | | $magic eq 'DPDB' || $magic eq 'DPDP' |
| 4963 | 33 | | scalar @messages and my $logger = $$self{"logger"} |