Branch Coverage

File:blib/lib/Database/BI/Controller/Dashboard.pm
Coverage:85.7%

line%coveragebranch
437100TFunless defined $fn and length $fn
439100TFunless defined $level
440100TF$level >= 1 && $level <= 100 ? :
451100TFunless defined $fn and length $fn
452100TFif $MEASURE_FN_OK{$fn}
453100TFdefined _measure_percentile($fn) ? :
527100TFunless defined $value and $value =~ /\A-?[0-9]{1,$MAX_WHOLE_NUMBER_DIGITS}\z/u
540100TFdefined $name && !ref($name) && $SCATTER_SCHEMES{$name} ? :
545100TFdefined $name && !ref($name) && $SEQUENTIAL_SCHEMES{$name} ? :
558100TFdefined $name && !ref($name) && $SCATTER_SCHEMES{$name} ? :
568100TFref $_ ? :
569100TFunless $min
570100TFunless $max
572100TFif $_ < 1
573100TFif $_ > 40
575100TF$min > $max ? :
594100TFunless defined $asked
597100TFif (defined $asked and $asked == 0) { }
601100TFif $per_page < 1
602100TFif $per_page > $MAX_PER_PAGE
604100TFif $page < 1
608100TF$per_page == $ALL_ROWS ? :
100TF$asked_in_url ? :
624100TFunless defined $value and $value =~ /\A[0-9]{1,4}\z/u
626100TF$PAGE_SIZE_OK{$value} ? :
68650TF'File::Spec'->file_name_is_absolute($_) ? :
68750TFif defined $_ and not ref $_
690100TFunless -e "$dir"
69250TFunless $seen{$real}++
69450TF@real ? :
70350TFdefined $path && length $path ? :
70450TFunless defined $abs
707100TF$root =~ m[/\z]u ? :
100TFif $root eq "/" or $abs eq $root or CORE::index($abs, $root =~ m[/\z]u ? $root : "$root/") == 0
720100TFunless $^O eq "MSWin32"
752100TFif ($^O eq "MSWin32")
75950TFunless length $try
760100TFif (-e $try)
76250TFif grep {$_ eq "..";} @rest
763100TF@rest ? :
826100TFunless (defined $hash and length $hash)
828100TFunless $from eq "" or $from =~ /\A(?:::ffff:)?127\./iu or $from eq "::1"
83350TFif (length $host)
83550TFif defined $_
100TFref $allowed eq 'ARRAY' ? :
836100TFunless $_ eq "*" or $_ eq $host
839100TF$req->reverse_proxy ? :
840100TFunless $ok
843100TFif $req->method =~ /\A(?:GET|HEAD|OPTIONS)\z/u
847100TFif (length $site)
848100TFif $site eq "same-origin" or $site eq "none"
852100TFunless defined $origin
855100TF$req->reverse_proxy ? :
856100TFif length $from and $from eq $to || length $fwd && $from eq $fwd
877100TFunless defined $url and $url =~ m[\Ahttps?://]iu
88350TFunless length $host
886100TFunless $host =~ /\A[a-z0-9_](?:[a-z0-9_.-]*[a-z0-9_])?\z/u or $host =~ /:/u and defined Database::BI::SafeUA::numeric_host($host)
888100TFif $host eq "localhost" or $host =~ /\.localhost\z/u
890100TFif defined $ip and Database::BI::SafeUA::blocked_address($ip)
908100TFunless defined $url and length $url
909100TFif $url =~ m[\A(?:/(?!/)|https?://)]iu
967100TFunless ref $c and $c->isa(__PACKAGE__)
97450TFif $seen{$key}++
976100TFunless defined $label and length $label
993100TFunless ref $c and $c->isa(__PACKAGE__)
995100TFunless ref $trail eq "ARRAY" and @$trail
997100TFif not length $here or "Mojo::URL"->new($here)->path->to_string eq $plain
1127100TFif @$names <= $keep + 1
1139100TFif ($spec =~ /\Apath:(.+)\z/u)
1142100TFdefined $internal ? :
1160100TFif $spec =~ m[\Atable:([^/]+)/(.+)\z]u
1161100TFif $spec =~ /\Atable:(.+)\z/u
1162100TFif ($spec =~ /\Aurl:(.+)\z/iu)
1166100TFif $spec =~ /\Aredis:/iu
116750TFif $spec =~ /$MARIADB_SPEC_RE/u
116850TFif $spec =~ /$MARIADB_SERVER_RE/u
1182100TFunless length($col // "") and length($op // "")
1183100TFunless $col =~ /$CRUMB_TEXT_RE/u
1185100TFif ($op eq "in")
1187100TF$n == 1 ? :
1190100TFif length($val // "") and not $val =~ /$CRUMB_TEXT_RE/u
1192100TF$op eq 'empty' || $op eq 'notempty' ? :
1195100TF@bits > 2 ? :
1196100TFif $extra
1197100TFif $extra
1198100TFif (my $range = $TIME_RANGE{$q->param("range") // ""})
1201100TF@bits ? :
1213100TF$_ eq 'loc' ? :
1214100TF$v =~ /$CRUMB_TEXT_RE/u ? :
1217100TFif $kind eq 'graph' || $kind eq 'line' || $kind eq 'scatter' and length $p{'x'} and length $p{'y'}
1218100TFif $kind eq "heatmap" and length $p{'x'} and length $p{'y'}
1219100TFif $kind eq "stacked" and length $p{'cat'} and length $p{'seg'}
1220100TFif $kind eq "pivot"
1221100TFlength $p{'lat'} ? :
100TFlength $p{'loc'} ? :
100TFif $kind eq "map"
1225100TFif $measure eq "__count__"
1226100TFif not length $measure and $kind eq 'pie' || $kind eq 'bar' || $kind eq 'treemap'
1227100TFlength $measure && length $dim ? :
127050TF$info->is_tablet ? :
100TF$info->is_mobile ? :
1342100TFunless -d $base
1354100TFunless defined $language and length $language
1356100TF-d $home->child("templates/$platform/$language") ? :
1369100TFif $file->is_abs
1465100TFlength $reason ? :
1487100TF$cfg->is_abs ? :
1500100TFunless @exts
1502100TFif grep {-f $data_dir->child("$stem.$_");} @exts
1585100TFif (_inside_dir(_canonical_path("Mojo::File"->new($store->dir)), _canonical_path(_data_dir_for($app))))
1597100TFunless open my $fh, "<:raw", $path
1600100TF$n && $head eq "SQLite format 3\000" ? :
1618100TFunless ref $c and defined $spec
1624100TFif $file =~ /\.(?:sql|sqlite3?)\z/iu or _is_sqlite_file($file)
1625100TFunless defined $c->_calc_models_path
1631100TFunless $src
163850TFunless $ok
1640100TFunless defined $bytes
164450TFunless defined $path
1650100TFif (ref $old eq "HASH" and defined $old->{'file'} and $old->{'file'} ne $name and $old->{'file'} =~ /\A[0-9a-f]{32}\.db\z/u)
165650TFunless $c->_write_models($models)
1666100TFunless ref $c and defined $spec
1671100TFunless ref $entry eq "HASH"
167250TFif (defined $entry->{'file'} and $entry->{'file'} =~ /\A[0-9a-f]{32}\.db\z/u)
1684100TFunless ref $c
1767100TFunless defined $entry
1769100TFref $entry eq 'HASH' ? :
1770100TFunless defined $type and not ref $type and length $type
1879100TFif $cols
1880100TFunless $records->[0]
1883100TF$c && $all{$c} ? :
1940100TFscalar(() = Database::BI::Util::iso_datetime($_[0])) ? :
1948100TFunless defined $v
1949100TFif _is_iso_date($v)
1950100TFif (my($m, $d, $y) = $v =~ m[\A(\d{1,2})/(\d{1,2})/(\d{4})\z]u)
1972100TFunless ref $columns eq "ARRAY" and ref $records eq "ARRAY"
197550TFunless defined $col
197850TFunless ref $row eq "HASH"
1980100TFunless defined $v
1983100TFunless length $v
1985100TFunless defined $iso
198750TFunless $m >= 1 and $m <= 12 and $d >= 1 and $d <= 31
1990100TFif $seen
2006100TFunless defined $value
2008100TFunless defined $day
2009100TFif $precision < 19
2056100TFunless defined $now
2063100TFif ($preset->{'hours'})
2069100TFif (defined $preset->{'day'})
2074100TFif (defined $preset->{'days'})
2079100TFif (defined $preset->{'month'})
2081100TF$preset->{'month'} == 0 ? :
2086100TFif (defined $preset->{'quarter'})
2088100TF$preset->{'quarter'} == 0 ? :
2093100TFif (defined $preset->{'year'})
2096100TF$preset->{'year'} == 0 ? :
2115100TFunless length($col // "") and length($lo // "") and length($hi // "")
2152100TFunless my $preset = $TIME_RANGE{$name // ""}
2153100TFunless defined $col and length $col and not $col =~ /:/u
2185100TFunless defined $name and length $name
2188100TFunless ($preset)
219650TFunless (defined $col and length $col and not $col =~ /:/u)
2238100TFunless defined $col and length $col and defined $op and $word{$op}
2240100TFif ($op eq 'between') { }
100TFelsif ($op eq 'in') { }
224250TFdefined $hi ? :
224550TFif ref $list eq "ARRAY"
2247100TF$op =~ /\A(?:empty|notempty)\z/u ? :
2250100TFif @filters
2252100TFif (ref $range eq "HASH" and defined $range->{'col'})
2256100TFif $c->param("d")
2279100TFunless length($col // "") and defined $op and length $op
2280100TFif $FILTER_OP{$op}
2306100TFunless ref $columns eq "ARRAY" and @{$columns;}
231050TFif @names <= $FILTER_COLUMNS_LISTED
2316100TFunless length($col // "") and defined $op and length $op
2318100TF$op eq 'differ' ? :
2320100TFunless defined $missing
2324100TFif (ref $range eq "HASH" and not $known{$range->{'col'} // ""})
2339100TFunless eval {         do {         $list = from_json($val // ""); 1 } }
2340100TFunless ref $list eq "ARRAY"
2355100TFunless defined $val
2359100TFunless @at
2362100TFif _is_iso_date($lo) and _is_iso_date($hi)
2365100TFunless length $lo and length $hi
2383100TFif (not @part and defined $cell and $cell =~ m[\A(\d{1,2})/(\d{1,2})/(\d{4})\z]u)
2386100TFunless @part
2388100TFif $precision < 19
2395100TFunless length($col // "") and defined $op and length $op
2405100TFif ($op eq "differ")
2406100TFexists $_[0]{$_[1]} ? :
2411100TF$between ? :
2413100TF$between ? :
2421100TF$is_date && grep({defined((Database::BI::Util::iso_datetime($_))[1]);} $between ? ($lo, $hi) : $val) ? :
2423100TF$is_date && !$between ? :
2427100TF$by_number ? :
2434100TFif ($between and defined $lo)
2435100TFif ($is_date) { }
2439100TFunless defined $num_lo and defined $num_hi
2442100TFif defined $num_lo and $num_lo > $num_hi
2443100TFif $lo gt $hi
2445100TF$op eq 'in' ? :
2448100TF$by_number ? :
2452100TF$is_date ? :
2466100TFif defined $n and $n >= $num_lo
2468100TF$is_date ? :
50TF$is_date ? :
100TF$is_date ? :
100TF$is_date ? :
100TF$is_date ? :
100TF$is_date ? :
100TF$op eq 'between' ? :
100TF$op eq 'between' && defined $num_lo ? :
100TF$op eq 'in' ? :
100TF$op eq 'notempty' ? :
100TF$op eq 'empty' ? :
100TF$op eq 'ge' ? :
100TF$op eq 'gt' ? :
100TF$op eq 'le' ? :
100TF$op eq 'lt' ? :
100TF$op eq 'starts' ? :
100TF$op eq 'contains' ? :
100TF$op eq 'ne' ? :
100TF$op eq 'eq' ? :
2469100TF$is_date ? :
2470100TFif defined $lo and $key ge $lo
2664100TFunless defined $raw->{$key}
2666100TFif ref $raw->{$key} ne "ARRAY"
2668100TFif grep {ref $_;} @{$$raw{$key};}
2670100TFif ref $raw->{'by'}
2673100TFif defined $_
2675100TFdefined $raw->{'by'} ? :
50TFif defined $_
2705100TFif $name eq "cs" or $name eq "by" or $name eq "order"
2825100TFunless $n
2827100TFif ($fn eq "running_count")
2831100TFif ($fn eq "running_total")
2834100TFif defined $v
2835100TFdefined $v ? :
2840100TFif ($fn eq "running_pct")
2845100TFif defined $v
2846100TF$total && defined $v ? :
2851100TFif ($fn eq "window_sum" or $fn eq "window_avg")
2854100TFif $lo < 0
2856100TFunless (@win)
2859100TF$fn eq 'window_sum' ? :
2864100TFif ($fn eq "lag")
2873100TFif ($fn eq "delta" or $fn eq "pct_change")
2877100TFif (defined $v and defined $prev)
2878100TF$prev ? :
100TF$fn eq 'delta' ? :
2888100TFif ($fn eq "pct_of_total")
2892100TF$total && defined $v ? :
2897100TFif ($fn eq "rank")
2901100TFdefined $v ? :
2906100TFif ($fn eq "zscore")
2908100TFif (@nums >= 2)
2915100TFdefined $v && defined $sd && $sd > 0 ? :
2931100TFif defined $nx and defined $ny
2937100TFdefined $_[0] ? :
3003100TFif $opts and $opts->{'chips_only'}
3009100TF$crossing ? :
3010100TFif (defined(my $why = _unknown_filter_column($self, $columns, \%written)))
3015100TFif ($written{(split(/:/u, $s, 2))[0] // ""})
3026100TFif $columns and _dedup_requested($self)
3033100TFif ($crossing)
3140100TF$self->param('d') ? :
3155100TFunless $seen{$key}++
3199100TFunless $is_sql
3206100TFunless length($col // "") and defined $op and length $op
3210100TFif (exists $criteria{$col})
3215100TFif ($op eq 'eq' or $op eq 'ne') { }
100TFelsif ($op eq 'contains') { }
100TFelsif ($op eq 'starts') { }
100TFelsif ($op eq 'lt') { }
100TFelsif ($op eq 'le') { }
100TFelsif ($op eq 'gt') { }
100TFelsif ($op eq 'ge') { }
3218100TFif ($val =~ /[%_]/u or _is_iso_date($val)) { }
3221100TF$op eq 'eq' ? :
3226100TFif ($val =~ /[%_]/u) { }
3232100TFif ($val =~ /[%_]/u) { }
3239100TF&Scalar::Util::looks_like_number($val) ? :
3243100TF&Scalar::Util::looks_like_number($val) ? :
3247100TF&Scalar::Util::looks_like_number($val) ? :
3251100TF&Scalar::Util::looks_like_number($val) ? :
3270100TFdefined $col ? :
3299100TFunless $n
3302100TFif $h == $lo or $lo >= $n - 1
3319100TFunless $n >= 2
3334100TFunless @$sorted
3347100TFif defined $level
3348100TFif $fn eq "median"
3349100TFif $fn eq "stdev"
3350100TFif $fn eq "range"
3365100TFunless defined $v and length $v
3366100TFunless defined _numeric_cell($v)
3367100TFif ++$seen >= 20
3369100TF$seen ? :
3393100TFunless $source and $source->can("aggregate")
3394100TFunless defined $fn and $PUSHED_MEASURE_FN_OK{$fn}
3395100TFif $fn eq "count" or $fn eq "count_distinct"
339650TFunless defined $col
3411100TFunless defined $v and length $v
3412100TFunless &Scalar::Util::looks_like_number($v)
342650TFunless defined $str and length $str
3428100TFunless defined $fn and defined $as and length $fn and length $as
3430100TFunless _measure_fn_ok($fn)
3631100TFif $offset < 0
3633100TFif $last > $rows->$#*
3643100TFunless $total and $per_page and $per_page > 0
3674100TFif (@filled and not grep({not m[\A(?:\d{4}-\d{2}-\d{2}|\d{1,2}/\d{1,2}/\d{4})\z]u;} @filled)) { }
100TFelsif (@filled and not grep({not defined Database::BI::Util::parse_number($_);} @filled)) { }
3677100TFunless my($p1, $p2) = m[\A(\d{1,2})/(\d{1,2})/]u
367850TFif ($p1 > 12)
367950TFif ($p2 > 12)
3682100TFif $v =~ /\A(\d{4})-(\d{2})-(\d{2})\z/u
3683100TFif ($v =~ m[\A(\d{1,2})/(\d{1,2})/(\d{4})\z]u)
368450TF$month_first ? :
3694100TF$dir eq 'desc' ? :
3696100TFif ($key_of) { }
369850TFunless $sign * ($key[$a] <=> $key[$b])
370150TFunless $sign * _collate($key[$a], $key[$b])
3717100TFif (defined $1) { }
372150TF$c =~ /\p{L}/u ? :
100TF$c =~ /\s/u ? :
3729100TF@$x < @$y ? :
3734100TFif $c
3964100TFunless $seen{$col}++
3970100TFif (defined $source_col)
3982100TF$has_col{$_} ? :
3983100TFif defined $source_col
4001100TF$f =~ /[,"\r\n]/u ? :
4420100TFunless defined $v and not ref $v
4581100TFif ref $row ne "HASH"
4583100TFunless (Hash::Util::hashref_locked($row))
4655100TFif defined $_ and not ref $_
4681100TFunless ref $vis eq "HASH" and ref $vis->{'cross_row'} eq "HASH" and ref $vis->{'cross_row'}{'cs'} eq "ARRAY"
4984100TFif ($^O eq "MSWin32")
498650TFif defined $followed
4992100TF-e $string ? :
4993100TFif (defined $real and length $real)
4994100TF@tail ? :
499950TFif $parent->to_string eq $string
502550TFif $part eq "."
5026100TFif ($part eq "..")
5028100TFif (-l $here)
5029100TFif ++$hops > 40
503150TFunless defined $target and length $target
5036100TFif ("File::Spec"->file_name_is_absolute($target))
503750TFif length $tvol
5060100TFunless defined $spec and $spec =~ m[\Apath:(?!/\.\./)([^\n]+)\z]u
5062100TFdefined $internal ? :
5066100TFif ($^O eq "MSWin32")
506850TFif defined $followed
5070100TFunless -e $path
507250TFdefined $real && length $real ? :
5084100TFunless length $path and length $dir
5085100TFif $path eq $dir
508850TFunless defined $rel and length $rel
508950TFif "File::Spec"->file_name_is_absolute($rel)
5090100TF$rel eq '..' || $rel =~ m[\A\.\.[\\/]]u ? :
5157100TFdefined $rest ? :
5158100TFif $new eq $key
5161100TFref $cur eq 'HASH' && ref $old eq 'HASH' ? :
519650TFunless print {$fh;} $bytes
5197100TFunless close $fh
5198100TF-e $path ? :
5200100TFunless rename $temp, $path
5204100TFunless ($ok)
5239100TFif not defined $path or $STORE_LOCKS_HELD{$path}
5249100TFunless ($opened)
5256100TFif $locked = flock($fh, 6)
5259100TFunless ($locked)
5272100TFunless $self->{'fh'}
5365100TFif ($doc->{'datasets'})
5366100TFif ref $_ eq "HASH" and defined $_->{'spec'}
5368100TFif ref $ds->{'filters'} ne "ARRAY"
5374100TFif ($doc->{'visuals'})
5375100TFref $_ eq 'HASH' ? :
5378100TFif ($doc->{'params'})
5380100TFunless ref $def eq "HASH"
5393100TFif ref $vis->{'filters'} ne "ARRAY"
5639100TFunless ref $body eq "HASH"
5643100TFif $err
5647100TFunless ($self->_analyses_path)
5665100TFunless $self->_save_analyses_or_503($analyses)
5674100TFunless $id =~ /\A[A-Za-z0-9]+\z/u
5679100TFunless exists $analyses->{$id}
5688100TFunless $id =~ /\A[A-Za-z0-9]+\z/u
5693100TFunless exists $analyses->{$id}
5696100TFunless ref $body eq "HASH"
5700100TFif $err
5710100TFunless $self->_save_analyses_or_503($analyses)
5719100TFunless $id =~ /\A[A-Za-z0-9]+\z/u
5724100TFunless exists $analyses->{$id}
5727100TFunless ref $body eq "HASH"
5734100TFif $perr
5740100TFif $key eq "id" or $key eq "created"
5746100TFunless $self->_save_analyses_or_503($analyses)
5755100TFunless $id =~ /\A[A-Za-z0-9]+\z/u
5760100TFunless exists $analyses->{$id}
5763100TFunless $self->_save_analyses_or_503($analyses)
5783100TFunless $id =~ /\A[A-Za-z0-9]+\z/u
5788100TFunless exists $analyses->{$id}
5792100TFunless ref $body eq "HASH"
5799100TFunless $supported{$kind}
5803100TFif defined $body->{$key} and ref $body->{$key} ne "HASH"
5808100TFif ($kind eq "text")
5810100TFif @$errors
58140TFif defined $body->{'title'} and not ref $body->{'title'} and length $body->{'title'}
581950TFunless $self->_save_analyses_or_503($analyses)
5836100TFif (my $raw = $body->{'cross_row'})
5839100TFif $plan->{'error'}
584450TFif defined $body->{'title'} and not ref $body->{'title'} and length $body->{'title'}
5853100TFif $ctx->{'error'}
5868100TF@{$ctx->{'cf_specs'};} ? :
5871100TFif $rendered->{'error'}
5875100TFunless $self->_save_analyses_or_503($analyses)
591950TFunless $id =~ /\A[A-Za-z0-9]+\z/u
5924100TFunless exists $analyses->{$id}
5928100TFunless $index =~ /\A\d+\z/u
5932100TFunless $index < scalar @{$a->{'visuals'} // [];}
5935100TFunless ref $body eq "HASH"
5939100TFif (($a->{'visuals'}[$index]{'kind'} // "") eq "text")
5941100TFif exists $body->{'encode'} or exists $body->{'cross_row'}
5943100TFunless ref $body->{'options'} eq "HASH"
5946100TFif @$errors
595150TFunless $self->_save_analyses_or_503($analyses)
5958100TFunless $has_encode or $has_plan
5963100TFif ($has_encode)
596550TFunless ref $body->{'encode'} eq "HASH"
5969100TFif ($has_plan)
5970100TFif (defined $body->{'cross_row'}) { }
5972100TFunless ref $body->{'cross_row'} eq "HASH"
5975100TFif $plan->{'error'}
598550TFif $ctx->{'error'}
599250TFif (@{$ctx->{'cf_specs'};} and $ctx->{'cf_source'} != $index)
6004100TFif $rendered->{'error'}
6008100TFunless $self->_save_analyses_or_503($analyses)
6034100TFunless $id =~ /\A[A-Za-z0-9]+\z/u
6039100TFunless exists $analyses->{$id}
6043100TFunless $index =~ /\A\d+\z/u
6047100TFunless $index < scalar @{$a->{'visuals'} // [];}
6049100TFunless ($a->{'visuals'}[$index]{'kind'} // "") eq "text"
605650TFif ($n =~ /\A\d+\z/u)
6057100TFif $n == $index
6058100TFif $n > $index
6062100TFif $a->{'layout'}
606450TFif ref $_ eq "HASH" and defined $_->{'state'}
606950TFunless $self->_save_analyses_or_503($analyses)
6085100TFunless defined $search and not ref $search and defined $removed and not ref $removed and $removed =~ /\A[0-9]{1,9}\z/u
6088100TF$1 > $removed ? :
100TF$1 == $removed ? :
100TFlength $1 > 9 ? :
6108100TFunless ref $raw eq "HASH"
6112100TFdefined $raw->{'text'} && !ref($raw->{'text'}) ? :
6114100TFif (not $text =~ /\S/u) { }
100TFelsif (length $text > $MAX_TEXT_CHARS) { }
6122100TFif (length(my $font = $raw->{'font'} // ""))
6123100TFif (not ref $font and exists $TEXT_FONT_CSS{$font}) { }
6127100TFif (length(my $size = $raw->{'size'} // ""))
6128100TFif (not ref $size and $size =~ /\A\d{1,3}\z/u and $size >= $MIN_TEXT_POINTS and $size <= $MAX_TEXT_POINTS) { }
6138100TFunless length $value
6139100TFif (not ref $value and $value =~ /\A#[0-9a-fA-F]{6}\z/u) { }
6143100TFif (length(my $align = $raw->{'align'} // ""))
6144100TFif (not ref $align and $TEXT_ALIGNS{$align}) { }
6149100TFif $raw->{$key}
6166100TFif $o->{'font'}
6167100TFif $o->{'size'}
6168100TFif $o->{'colour'}
6169100TFif $o->{'background'}
6170100TFif $o->{'bold'}
6171100TFif $o->{'italic'}
6172100TFif $o->{'align'}
6173100TF@style ? :
6192100TFunless defined $line
6194100TFlength $line > $TEXT_TITLE_CHARS ? :
6202100TFunless ($vis->{'kind'} // "") eq "text"
6204100TF$o->{'plain'} ? :
6225100TFunless $id =~ /\A[A-Za-z0-9]+\z/u
6230100TFunless exists $analyses->{$id}
6241100TF$upload ? :
6244100TFunless ref $body eq "HASH"
6252100TFif $err
625550TFunless ($self->_analyses_path)
6272100TFunless $self->_save_analyses_or_503($analyses)
6285100TFdefined $cv && $cv =~ /\A[0-9]{1,9}\z/u ? :
6442100TF$orient =~ /\A(?:h|horizontal)\z/iu ? :
6471100TFdefined $agg_fn && !ref($agg_fn) && length $agg_fn ? :
6473100TFif defined $named and $named eq "count"
6475100TFif not defined $named and $count_col
6477100TFif defined $named and $count_col
6480100TFdefined $named ? :
6482100TF$fn eq 'sum' ? :
7308100TFif length($enc->{$key} // "")
736550TFunless $id =~ /\A[A-Za-z0-9]+\z/u
7369100TFunless (exists $analyses->{$id})
739450TFif ($analysis_updated and $analysis_updated =~ /                    \A                    (\d{4}) - (\d{2}) - (\d{2})     # $1 yr  $2 mon  $3 day                    T                    (\d{2}) : (\d{2}) : (\d{2})     # $4 hr  $5 min  $6 sec                    Z? \z            /ux)
740750TFunless $spec =~ /\A(?:table|path):/u
7409100TFunless $src and $src->can("updated")
741150TFif $mt > $newest_src_mtime
7413100TFif ($newest_src_mtime and $analysis_updated and $newest_src_mtime > $analysis_updated)
7423100TFif (@visuals)
7432100TFif (@$p_errors)
7449100TFdefined $def->{'min'} ? :
100TFdefined $def->{'max'} ? :
746150TFif $name eq "range" or $name eq "rcol"
7468100TFunless (defined $records)
7499100TFif ($@)
7508100TFif ($cross_row and $cross_row->{'error'})
7517100TFif (my $range = $self->stash("time_range"))
7539100TFif ($cf_active)
75440TF$op eq 'starts' ? :
50TF$op eq 'contains' ? :
50TF$op eq 'ge' ? :
100TF$op eq 'gt' ? :
50TF$op eq 'le' ? :
50TF$op eq 'lt' ? :
50TF$op eq 'ne' ? :
100TF$op eq 'eq' ? :
7561100TFif (@cf_specs)
756550TFif ($base ne "/")
7566100TF$base =~ /\?/u ? :
7580100TFdefined $dl_raw && length $dl_raw ? :
758150TFif $dd_level < 0
7589100TF$dd_hier && length $dd_name && @{$dd_hier->{'levels'} // [];} ? :
7594100TFif ($drill_active)
760050TFif $dd_level > $dl_cap
760850TFif length($col // "") and ($op // "") eq "eq"
7615100TF$dd_level > 0 ? :
100TF$dd_level == 0 ? :
7629100TFunless ($is_last)
763550TFif defined $val_j
7641100TF$is_last ? :
765650TFunless defined $x and defined $y and defined $w and defined $h
7670100TFif ($cf_active and $i != $cf_source)
7674100TF$cf_active && $i != $cf_source ? :
7692100TFdefined $layout_size{$i} ? :
100TFdefined $layout_size{$i} ? :
100TF$i == $cf_source ? :
7705100TF_column_is_numeric($records, $_) ? :
7717100TF$cross_row && ref $cross_row eq 'HASH' ? :
7747100TF$self->stash('time_range') ? :
100TF$cf_active ? :
100TF$drill_active ? :
100TF$drill_active ? :
7750100TF$self->stash('time_range') ? :
7780100TFunless defined $url
7866100TFunless defined $s
7867100TFunless utf8::is_utf8($s)
7888100TFif $known{$_}
788950TFif defined $_
7890100TFunless @keep
7901100TFexists $row->{$_} ? :
8102100TFif (defined $ENV{'BI_OPEN'} and length $ENV{'BI_OPEN'})
8105100TFunless defined $from and ("Mojo::URL"->new($from)->host_port // "") eq $here
8156100TFdefined $path && $path =~ /$EXT_RE/u ? :
8219100TFunless defined $value and $value =~ m(\A/(?![/\\]))u and not $value =~ /[\x00-\x20\x7f\\]/u
8220100TFif $value =~ m[\A/log(?:in|out)\b]u
8227100TFdefined $hash && length $hash ? :
8232100TFsecure_compare($self->session('login') // '', $self->_login_mark($hash)) ? :
8236100TFunless defined $self->_login_hash
8237100TFif ($self->_logged_in)
8244100TFif ($req->method =~ /\A(?:GET|HEAD)\z/u and ($req->headers->accept // "") =~ m[text/html]u and not $req->url->path->to_string =~ m[\A/api/]u)
8266100TF$args{'login_off'} ? :
8273100TFunless defined $self->_login_hash
8274100TFif $self->_logged_in
8280100TFunless defined $hash
8287100TFunless @{$failures->{$addr};}
8290100TFif (@{$seen;} >= $LOGIN_ATTEMPTS)
8295100TFunless (Database::BI::Password::verify_password(scalar $self->param("password") // "", $hash))
8308100TFdefined $self->_login_hash ? :
8385100TFif $self->buffer_is_cached
8471100TFunless (defined $table and $table =~ /$TABLE_NAME_RE/u)
8477100TF$self->param('d') ? :
8482100TFif ($source and $source->sqlite_tables and @{$source->sqlite_tables;} > 1) { }
8492100TFif ($@)
8501100TFunless ($listing and grep {&$stem_of($_) eq lc $table;} $listing->each)
8523100TFif ($is_multi)
8529100TFif $self->stash("_cross_row_error")
8542100TFunless $page_columns
8627100TFif (my $refusal = _outside_roots($self, $raw_path))
8631100TFunless defined $dir and -d $dir
865050TFunless length $name
8653100TFif $parent->to_string eq $f->to_string
8654100TFif _outside_roots($self, $parent->to_string)
8660100TF$parent->to_string ne $dir->to_string && !_outside_roots($self, $parent->to_string) ? :
8754100TFunless defined $file_path
8761100TFif (defined $enc and $UPLOAD_ENCODINGS{$enc})
876650TFif ($file_path =~ /$REDIS_URL_RE/u)
877150TFif ($file_path =~ /$MARIADB_SERVER_RE/u)
877750TFif ($file_path =~ /$REDIS_SPEC_RE/u or $file_path =~ /$MARIADB_SPEC_RE/u)
87800TFunless ($source)
87820TFunless defined $why
87960TF$self->param('d') ? :
88020TFif ($@)
88170TFif $self->stash("_cross_row_error")
88230TFunless $page_columns
8859100TFif ($file_path =~ m[\A/\.\./]u)
8862100TFunless $source
886550TF$self->param('d') ? :
887150TFif ($@)
888650TFif $self->stash("_cross_row_error")
889250TFunless $page_columns
8928100TFif defined $named_it
8929100TFif (my $refusal = _outside_roots($self, $file_path))
8935100TFunless defined $file and CORE::index($file, "\0") == -1 and do {         BEGIN {${^WARNING_BITS} = "\x55\x55\x51\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55"} -f $file } and $file->basename =~ /$EXT_RE/u
8948100TFif (defined $it and $it =~ /$TABLE_NAME_RE/u)
8951100TFif $data_dir and $file_dir and "$file_dir" eq "$data_dir"
8955100TFif defined $it and length $it and not $it =~ /[#\n]/u and $lspec =~ /\Apath:/u
8959100TFif ($back_override)
8962100TF$back_override ? :
8964100TF$self->param('d') ? :
8967100TFdefined $it ? :
100TFdefined $it ? :
8971100TFif (not defined $it and $source and $source->sqlite_tables and @{$source->sqlite_tables;} > 1) { }
8979100TFif ($@)
8984100TFif ($filename =~ /\.(?:sql|sqlite|sqlite3|db)\z/iu and not $@ =~ /cannot be opened|can be opened/u)
9005100TFif ($is_multi_local)
9011100TFif $self->stash("_cross_row_error")
9017100TFunless $page_columns
9023100TFdefined $it ? :
100TFdefined $it ? :
9095100TFunless $idx =~ /\A[0-9]+\z/u
9109100TFunless length $url
9110100TFunless $url =~ m[\Ahttps?://]iu
9112100TFunless _is_safe_url($url)
9121100TFunless $ok
912750TF$self->param('d') ? :
912850TFif $dedup
913150TFif $idx
9212100TFunless (defined $table_name or defined $path)
9214100TFif ($spec =~ m[\Atable:([A-Za-z_][A-Za-z0-9_]*(?:/[A-Za-z_][A-Za-z0-9_]*)?)\z]u) { }
100TFelsif ($spec =~ /\Apath:(.+)\z/su) { }
922250TFif (($self->param('spec') // '') =~ /$MARIADB_SPEC_RE/u) { }
100TFelsif (defined $table_name and $table_name =~ m[\A([A-Za-z_][A-Za-z0-9_]*)(?:/([A-Za-z_][A-Za-z0-9_]*))?\z]u) { }
100TFelsif (defined $path) { }
9229100TFunless defined $stem
9232100TFdefined $internal ? :
9237100TFif ($path =~ m[\A/\.\./([^/]+)((?:/.+)?)/([^/]+)\z]u) { }
100TFelsif (my $refusal = _outside_roots($self, $path)) { }
923950TFunless length $dir_part
924050TFif ($host =~ /$REMOTE_HOST_RE/u)
924150TF$file =~ /\A(.+)\.([^.]+)\z/u ? :
924250TFdefined $ext ? :
50TFdefined $path_internal ? :
9250100TFif (defined $file and -f $file and $file->basename =~ /$EXT_RE/u)
9253100TFdefined $path_internal ? :
9259100TFunless $source
926250TF$source->columns ? :
9308100TFunless length $spec_str
9309100TFunless length $col
9315100TFunless $records and grep {$_ eq $col;} @$columns
9321100TFunless length $v
9323100TFif (defined(my $day = (Database::BI::Util::iso_datetime($v))[0])) { }
50TFelsif (my(@m) = $v =~ /$mdy_re/u) { }
9330100TFunless @dates
9397100TFif @{$self->every_param("c");} > $self->_calc_specs_of_request
9403100TFunless $left_src
941250TFunless $join_type =~ /\A(?:left|inner|outer)\z/u
9417100TFunless defined $right_spec and defined $left_key and defined $right_key
942050TFunless $cur_cols
942150TFunless {map({$_, 1;} @$cur_cols)}->{$left_key}
9424100TFunless $right_src
9427100TFunless $right_cols
942850TFunless {map({$_, 1;} @$right_cols)}->{$right_key}
9438100TF$left_key ne $right_key ? :
50TF$right_label ? :
945150TF$self->param('d') ? :
9453100TF($self->param('dir') // 'asc') =~ /\Adesc\z/iu ? :
946250TFif ($@)
9475100TFif $self->stash("_cross_row_error")
9480100TFunless $page_columns
948350TFif (defined $sort and not grep({$_ eq $sort;} @columns))
9490100TFif @summaries
9587100TFunless $left_src
959250TFunless (defined $records)
961050TFif $span and $span->{'error'}
961250TF$span ? :
961450TFunless ($calc_records)
9622100TFunless $self->_reduce_or_render(\$records, \$cols_ref)
9625100TF$self->param('d') ? :
9629100TF($self->param('dir') // 'asc') =~ /\Adesc\z/iu ? :
9630100TFif (defined $sort and grep {$_ eq $sort;} @columns) { }
50TFelsif (defined $sort) { }
9634100TFif $dir eq "desc"
9643100TF$total > $offset + $per_page ? :
9651100TF@join_specs ? :
9655100TFif (length $table_key > 120)
9821100TFif $self->stash("_reduce_error")
9822100TFunless $records
9828100TFif (@$warnings)
9838100TFif $format eq "pdf"
9840100TF$format eq 'json' ? :
100TF$format eq 'sqlite' ? :
9997100TFif (my $refusal = _outside_roots($self, $dir) // _outside_export_dirs($self, $dir))
10001100TFunless (defined $dest_dir and -d $dest_dir)
10009100TFif $filename =~ /\0/u
10022100TFif /\A\./u and $_ ne "."
100TFif (grep {$_ ne ".." if /\A\./u and $_ ne ".";} @names)
10029100TFif ($filename and $filename =~ /\.csv\z/iu) { }
100TFelsif ($filename and $filename =~ /\.sql\z/iu) { }
100TFelsif ($filename and $filename =~ /\.json\z/iu) { }
10040100TFif $self->stash("_reduce_error")
10041100TFunless $records
10050100TFif (-l $dest or -e $dest and not -f $dest)
10055100TF$format eq 'json' ? :
100TF$format eq 'csv' ? :
1006350TFunless print {$fh;} $bytes
1006450TFunless close $fh
10068100TF@old ? :
1006950TFunless rename $tmp, $dest->to_string
1007450TFif defined $tmp
10075100TFunless $ok
10130100TFif (my $refusal = _outside_roots($self, $raw) // _outside_export_dirs($self, $raw))
10134100TFunless defined $dir and -d $dir
10146100TF$up ? :
10202100TFunless (defined $path and length $path)
10213100TFunless defined $file and -f $file and $file->basename =~ /$EXT_RE/u and not _outside_roots($self, $path)
10222100TFif ($file->basename =~ /\.(?:sql|sqlite|sqlite3|db)\z/iu)
10229100TFdefined $table_count ? :
10309100TFunless ($upload and $upload->filename)
10321100TFif ($self->req->is_limit_exceeded or $upload->size > $MAX_UPLOAD_BYTES)
10331100TFunless ($filename and $filename =~ /$EXT_RE/u)
10347100TFunless -d $uploads_base
10350100TFunless (defined $sub_dir)
10366100TFunless ($ok and -f $dest)
10375100TF$filename =~ /$TEXT_EXT_RE/u ? :
10378100TF$converted ? :
100TF$converted ? :
10399100TFunless defined $bytes and length $bytes
10401100TFif ($bytes =~ /\A\xFF\xFE(?!\x00\x00)/u) { }
100TFelsif ($bytes =~ /\A\xFE\xFF/u) { }
100TFelsif (eval {         do {         &Encode::decode('UTF-8', $bytes, 9); 1 } }) { }
1041150TF$ok ? :
1041750TFunless -d $uploads_dir
1042750TFif (-d $entry) { }
0TFelsif (-f $entry) { }
1043050TFunless -f $file
10443100TFunless ($ok)
10474100TFunless length $x_col and length $y_col
10480100TFif (length $agg_fn and not _measure_fn_ok($agg_fn))
10488100TFunless defined $records
10492100TFif $span and $span->{'error'}
10495100TF$span ? :
1049650TFif ($@)
10499100TFunless $self->_reduce_or_render(\$records, \$columns)
10503100TFunless $col_set{$x_col}
10505100TFunless $col_set{$y_col}
10506100TFif (length $series_col)
10508100TFunless $col_set{$series_col}
10512100TFif $span
10516100TFif (length $agg_fn)
1051850TFif $m->{'error'}
10526100TFlength $series_col ? :
1053350TFunless length $bucket
10534100TFunless $bucket_seen{$bucket}++
10535100TFlength $series_col ? :
1053650TFif length $series_col and not length $name
10537100TFunless $series_seen{$name}++
10545100TFlength $series_col ? :
10549100TFif (length $series_col) { }
10554100TFdefined $value_of{$_}{$name} ? :
1055650TF@points ? :
1055850TFunless @series_data
1056750TFdefined $value_of{$_}{''} ? :
1056950TFunless @pairs
1057750TFunless utf8::is_utf8($chart_html)
10587100TFlength $series_col ? :
1059050TF$back2 ? :
50TF$back2 ? :
10609100TFif (length $series_col)
1061650TFunless length $x and length $y and length $grp
1061850TFunless defined $yn
10619100TFunless (exists $by_series{$grp})
1062650TFunless @series_order
1064150TFunless utf8::is_utf8($chart_html)
1064950TF$back2 ? :
50TF$back2 ? :
10674100TFunless length $x and length $y
10676100TFunless defined $yn
10677100TFif $_ ne $x_col
10681100TFunless @pairs
10694100TFif (not $ENV{'BI_FORCE_PERL_AGG'} and $src and not $has_filter and not _dedup_requested($self) and _measure_pushable($src, "avg", $y_col, $records))
1070650TFif (not $@ and $ref and @$ref)
10713100TFunless (defined $min_y)
1073550TFunless utf8::is_utf8($chart_html)
1076150TF$back2 ? :
50TF$back2 ? :
100TF$trend ? :
10777100TFunless ref $ys eq "ARRAY" and @$ys >= 2
1078050TFunless $fit->setData([0 .. $ys->$#*], $ys)
1078250TFunless defined $slope and defined $intercept
10790100TF$self->param('donut') ? :
10795100TFunless length $cat_col and length $val_col
10799100TFunless defined $records
1080450TFif $span and $span->{'error'}
10807100TF$span ? :
1080850TFif ($@)
1081050TFunless $self->_reduce_or_render(\$records, \$columns)
10814100TFunless $col_set{$cat_col}
1081950TFunless $count_mode or $col_set{$val_col}
10821100TFif $span
10827100TFunless ($count_mode)
1083050TFunless length $v
10831100TFif ($v =~ /\A\s*\(?\s*([^\d\s.,\-\(])/u)
10839100TF$count_mode ? :
100TF$count_mode ? :
1085150TFif ($topn_n > 0 and @$agg_rows > $topn_n)
108580TFif (@$other_rec)
108590TF$count_mode ? :
0TF$count_mode ? :
108650TFif @$other and defined $other->[0]{'value'}
10870100TFunless @$agg_rows
10881100TF$count_mode ? :
1089350TFunless utf8::is_utf8($chart_html)
1090250TF$back2 ? :
50TF$back2 ? :
10982100TF$self->param('show_val') ? :
10987100TFunless length $x_col and length $y_col
10991100TFunless defined $records
10996100TFif $span and $span->{'error'}
10999100TF$span ? :
1100050TFif ($@)
11002100TFunless $self->_reduce_or_render(\$records, \$columns)
11006100TFunless $col_set{$x_col}
11008100TFunless $col_set{$y_col}
1101050TFif length $val_col and not $col_set{$val_col}
11013100TFif $span
1102350TFunless length $x and length $y
11024100TFunless $seen_x{$x}++
11025100TFunless $seen_y{$y}++
11029100TFlength $val_col ? :
100TFlength $val_col ? :
11050100TFunless @triples
11058100TFlength $val_col ? :
11060100TFlength $val_col ? :
1107150TFunless utf8::is_utf8($chart_html)
1108050TF$back2 ? :
50TF$back2 ? :
11162100TFunless length $cat_col
11166100TFunless defined $records
11174100TFif $span and $span->{'error'}
11177100TF$span ? :
11178100TFif ($@)
11180100TFunless $self->_reduce_or_render(\$records, \$columns)
11184100TFunless $col_set{$cat_col}
11189100TFunless $count_mode or $col_set{$val_col}
11192100TFif $span
11195100TF$count_mode ? :
100TF$count_mode ? :
11207100TFif ($topn_n > 0 and @$agg_rows > $topn_n)
1121450TFif (@$other_rec)
1121550TF$count_mode ? :
50TF$count_mode ? :
1122150TFif @$other and defined $other->[0]{'value'}
11226100TFunless @$agg_rows
11233100TF$orient eq 'h' ? :
11234100TF$sort eq 'value' || $sort eq 'label' ? :
11239100TF$count_mode ? :
11241100TF$count_mode ? :
100TF$max_bars > 0 ? :
1125450TFunless utf8::is_utf8($chart_html)
1126350TF$back2 ? :
50TF$back2 ? :
11349100TFunless length $left_spec
11354100TFif length $prefix > $MAX_PREFIX_LEN
11363100TFif $self->stash("_reduce_error")
11364100TFunless $records
11369100TFunless (length $key_col)
1137050TF$#{$records;} < 9 ? :
11373100TFif (($row->{$col} // "") =~ /\A[A-Z]{1,4}\d+[A-Z]?\z/u)
11388100TFunless defined $p
11400100TFif length $p <= $len
11401100TFif substr($p, 0, $len) ne $par
11412100TFif substr($p, 0, length $par) eq $par
1142350TFif length $key_col
11429100TFif (not length $prefix) { }
11447100TF$i < length $prefix ? :
1147250TFunless ($an // 0) <=> ($bn // 0)
11476100TFlength $prefix ? :
11491100TF@breadcrumb ? :
1149350TFif @$trail
11534100TFunless defined $spec and length $spec
11539100TFif ($spec =~ /\Atable:([A-Za-z0-9_]+)\z/u) { }
100TFelsif ($spec =~ /\Apath:(.+)\z/u) { }
50TFelsif ($spec =~ /$REDIS_URL_RE/u) { }
50TFelsif ($spec =~ /$MARIADB_SERVER_RE/u) { }
11545100TFif (-f $p)
11550100TFunless defined $file_path
11556100TFif (my $refusal = _outside_roots($self, $path_arg))
11560100TFunless defined $file and -f $file and $file->basename =~ /\.(?:sql|sqlite|sqlite3|db|json|xlsx)\z/iu
115700TFif ($spec =~ m[\Aredis://(?::([^\@]*)@)?([^/]+)(?:/(\d+))?\z]iu)
115850TFif (eval {         do {         require "$file.pm"; 1 } })
115870TFunless $pkg
115950TFif defined $password and length $password
115960TFif defined $db_idx and int $db_idx > 0
116150TFif $@
116250TFunless ($found)
116410TFunless ($name =~ /$TABLE_NAME_RE/u)
116430TFunless $safe =~ /\A[A-Za-z_]/u
1165650TFif (defined $file_path)
11663100TF$file_path =~ /\.xlsx\z/iu ? :
100TF$file_path =~ /\.json\z/iu ? :
1166450TFunless $schema
11671100TFunless ($tname =~ /$TABLE_NAME_RE/u or $file_path =~ /\.(?:json|xlsx)\z/iu)
1167350TFunless $safe =~ /\A[A-Za-z_]/u
11742100TFunless length $left_spec
11750100TFunless length $rows_str
11754100TFunless @measure_strs
11766100TFunless $m
11773100TF$self->param('totals') // '' ? :
11780100TFunless defined $records
11787100TFif $span and $span->{'error'}
11792100TF$span ? :
11793100TFif ($@)
1179550TFunless $self->_reduce_or_render(\$records, \$columns)
11803100TFunless $col_set{$dim}
11806100TFif ($span)
11807100TF$_ eq $span->{'src'} ? :
118080TF$_ eq $span->{'src'} ? :
11812100TFunless defined $m->{'col'} and length $m->{'col'}
11816100TFunless $col_set{$m->{'col'}}
11830100TFdefined $m->{'col'} && length $m->{'col'} ? :
11840100TFunless ($row_seen{$rkey}++)
11844100TFunless ($col_seen{$ckey}++)
1185750TFif (@h_specs)
118700TFif defined $cv
118770TFunless @$passed
118790TFif $ok
11892100TFif ($topn_n > 0 and @row_key_order > $topn_n)
11894100TFif (length $topn_col and not $m_aliases{$topn_col})
1190050TFlength $topn_col ? :
1191250TFif (@rest_rkeys) { }
1192050TFif (@$other_rec) { }
1192450TFdefined $m->{'col'} && length $m->{'col'} ? :
11950100TFif ($show_totals)
1195250TFdefined $m->{'col'} && length $m->{'col'} ? :
11967100TFif (@cols)
1198750TFif @$gtot
1199550TFif ($max_cols_n > 0 and @col_key_order > $max_cols_n)
120050TF$show_totals ? :
0TF$show_totals ? :
120100TFif (@rest_ckeys) { }
120180TFif (defined $cv)
120200TF$have ? :
12032100TFif ($format and $format =~ /\A(?:csv|sqlite|sql|json|xlsx)\z/u)
12044100TFif $format eq "csv"
1204650TFif $format eq "sqlite" or $format eq "sql"
12048100TFif $format eq "json"
1205050TFif ($format eq "xlsx")
1205450TFunless open my $fh, ">", \$out
12081100TF$total_row_groups > $offset + $per_page ? :
12082100TF$piv_has_next ? :
100TF$offset < $total_row_groups ? :
12110100TF$show_totals ? :
1211750TF$back2 ? :
50TF$back2 ? :
12190100TFunless length $left_spec
12198100TFif (defined $pct_arg and length $pct_arg)
12199100TFunless $pct_arg =~ /\A\d{1,3}\z/u and $pct_arg >= 1 and $pct_arg <= 100
12211100TFunless defined $records
1221550TFif ($@)
1221750TFunless $self->_reduce_or_render(\$records, \$columns)
12225100TFif defined $_->{$col}
1223950TF$nonnull[0] ? :
1224050TF$nonnull[-1] ? :
12245100TFif (@nums)
1226050TFdefined $stdev_val ? :
100TFdefined $min_val ? :
1228250TFCORE::index($back, '?') != -1 ? :
50TF$back2 ? :
50TF$back2 ? :
12319100TFunless $calc->has_error
12321100TFif ($err =~ /\AUnknown column '([^']+)'/u and not $cols{$1})
1232550TF$err =~ /\S/u ? :
12336100TFunless length $spec
12338100TFunless $name =~ /\A[A-Za-z_][A-Za-z0-9_]*\z/u
12342100TFunless length $expr
12347100TFif (defined(my $problem = _calc_syntax_problem($expr)))
12365100TFunless length $spec
12376100TFunless length $spec
12397100TFunless length $spec
12399100TFunless length $col
12401100TFunless length $group_name
12406100TFunless grep {/\S/u;} @values
12420100TFunless length $spec
12424100TFif (length $col and length $group_name) { }
100TFelsif (length $col) { }
12437100TFunless length $spec
12467100TFunless length $spec
12469100TFunless length $col
12474100TFunless $ALLOWED_DATE_PATTERNS{$pattern}
12478100TFif length $time and not $ALLOWED_TIME_PATTERNS{$time}
12479100TFif length $as and $as ne "timestamp"
12484100TFlength $time ? :
100TFlength $as ? :
100TFlength $time || length $as ? :
12501100TFunless length $spec
12505100TFif (length $col) { }
12520100TFunless length $spec
12545100TFunless length $spec
12547100TFunless $name =~ /$LOOKUP_NAME_RE/u
12549100TFunless length $key
12552100TFlength $col ? :
100TF@fields ? :
100TFdefined $self->param('default') ? :
12560100TFunless $ok
12575100TFunless length $spec
12579100TFif (length $name) { }
12592100TFunless length $spec
12617100TFunless length $spec
12619100TFunless $name =~ /$LOOKUP_NAME_RE/u
12621100TFunless length $col
12623100TFunless length $pattern
12626100TF@fields ? :
12629100TFunless $ok
12645100TFunless length $spec
12649100TFif (length $name) { }
12662100TFunless length $spec
12692100TFunless length $spec
12695100TFunless @cols and not grep({not length $_;} @cols)
12697100TFunless @kinds == @cols and not grep({not /\A(?:lat|lon|location|location_suffix)\z/u;} @kinds)
12700100TFunless defined $loc_text
12704100TFif ($self->param("replace"))
1270950TFif length $loc_text
12721100TFunless length $spec
12725100TFif (length $col) { }
12740100TFunless length $spec
1274750TFdefined $loc_text && !ref($loc_text) && length $loc_text ? :
12766100TFunless length $x_col
12767100TFunless length $y_col
12770100TFunless defined $records
1277350TFif ($@)
12775100TFunless $self->_reduce_or_render(\$records, \$columns)
12778100TFunless $col_set{$x_col}
1277950TFunless $col_set{$y_col}
12781100TFif length $series_col and not $col_set{$series_col}
12783100TFif length $size_col and not $col_set{$size_col}
12785100TFif (length $series_col and not $SCATTER_SCHEMES{$scheme})
12793100TFunless defined $xv and defined $yv
12795100TFif $_ ne $x_col
12797100TFif length $series_col
12798100TFif (length $size_col)
1280050TFif defined $sv
12802100TF%pt_meta ? :
12805100TFunless @points
12814100TFlength $series_col ? :
100TFlength $size_col ? :
1282450TFunless utf8::is_utf8($chart_html)
12826100TFlength $series_col ? :
100TFlength $size_col ? :
100TFlength $series_col ? :
100TFlength $size_col ? :
1284250TF$back2 ? :
50TF$back2 ? :
12877100TFunless length $cat_col
12878100TFunless length $seg_col
12881100TFunless defined $records
1288450TFif $span and $span->{'error'}
12887100TF$span ? :
1288850TFif ($@)
1289050TFunless $self->_reduce_or_render(\$records, \$columns)
12893100TFunless $col_set{$cat_col}
1289450TFunless $col_set{$seg_col}
1289850TFunless $count_mode or $col_set{$val_col}
12900100TFif $span
12904100TF$count_mode ? :
100TF$count_mode ? :
1292350TFlength $cat && length $seg ? :
1292550TFunless @data
12933100TF$count_mode ? :
12935100TF$orient eq 'h' ? :
1294350TFunless utf8::is_utf8($chart_html)
1296050TF$back2 ? :
50TF$back2 ? :
12988100TFunless length $x_col
12989100TFunless length $bar_col
12990100TFunless length $line_col
12993100TFunless defined $records
1299650TFif $span and $span->{'error'}
12999100TF$span ? :
1300050TFif ($@)
1300250TFunless $self->_reduce_or_render(\$records, \$columns)
1300550TFunless $col_set{$x_col}
1300650TFunless $col_set{$bar_col}
1300750TFunless $col_set{$line_col}
13009100TFif $span
1302750TFunless length $xv
1302850TFunless $x_seen{$xv}++
1303350TFunless length $xv
1303450TFunless $x_seen{$xv}++
1304450TFunless @data
13055100TF$scheme ? :
1306350TFunless utf8::is_utf8($chart_html)
13065100TF$scheme ? :
1307250TF$back2 ? :
50TF$back2 ? :
13147100TFlength $color_col ? :
13152100TFunless length $cat_col
13153100TFif $color_m and $color_m->{'error'}
13156100TFunless defined $records
13159100TFif $span and $span->{'error'}
13162100TF$span ? :
1316350TFif ($@)
13165100TFunless $self->_reduce_or_render(\$records, \$columns)
13168100TFunless $col_set{$cat_col}
1317250TFunless $count_mode or $col_set{$val_col}
13174100TFif length $color_col and not $col_set{$color_col}
13176100TFif $span
13178100TF$count_mode ? :
100TF$count_mode ? :
13188100TF$color_m ? :
13194100TFif ($topn_n > 0 and @$agg_rows > $topn_n)
1320150TFif (@$other_rec)
1320250TF$count_mode ? :
50TF$count_mode ? :
1320750TFif (@$other and defined $other->[0]{'value'})
1321250TFif $color_m
1321950TFunless @$agg_rows
13227100TFdefined $cv ? :
13233100TF$count_mode ? :
13234100TFif $color_m
13238100TF$color_m ? :
1324250TFunless utf8::is_utf8($chart_html)
13250100TF$color_m ? :
100TF$color_m ? :
1325350TF$back2 ? :
50TF$back2 ? :
13280100TFdefined $_bins_raw && length $_bins_raw ? :
13286100TFunless length $col
13289100TFunless defined $records
1329250TFif ($@)
13294100TFunless $self->_reduce_or_render(\$records, \$columns)
13297100TFunless $col_set{$col}
13302100TFif defined $v
13305100TFunless @values
1331050TF$bins =~ /\A\d+\z/u ? :
13311100TFif $bins < 1
13312100TFif $bins > $MAX_HISTOGRAM_BINS
13322100TFif ($min_v == $max_v) { }
1332950TFif $width <= 0
13330100TF$width == int $width ? :
13343100TFif $idx >= $bins
1334450TFif $idx < 0
13349100TFunless $bin_counts[$i]
13361100TF$scheme ? :
1336950TFunless utf8::is_utf8($chart_html)
13371100TF$scheme ? :
1337850TF$back2 ? :
50TF$back2 ? :
13426100TFdefined $text ? :
13427100TFif utf8::is_utf8($bytes)
13445100TFunless defined $text and length $text
13453100TFif length $_ >= $minlen
13465100TFdefined $raw && !ref($raw) && $raw =~ /\A\d+\z/u ? :
13466100TFif $n < $min
13467100TFif $n > $max
1349050TFif length $extra
1350250TFunless $count{$b} <=> $count{$a}
13504100TFif @words > $topn
13522100TF$back =~ /\?/u ? :
13543100TFunless length $col
13546100TFunless defined $records
1354950TFif ($@)
13551100TFunless $self->_reduce_or_render(\$records, \$columns)
13554100TFunless $col_set{$col}
13571100TFdefined $back_raw && length $back_raw ? :
1357550TFif length $qs
13580100TF$drill ? :
13591100TFif (defined $tag->{'href'}) { }
13599100TF@tags ? :
13608100TFdefined $stop && length $stop ? :
1362050TF$back2 ? :
50TF$back2 ? :
13667100TFref $loc eq 'ARRAY' ? :
13669100TFif defined $_ and not ref $_ and length $_
13714100TFif not defined $key or $waiting{$key}
13715100TFif (defined(my $osm = $inside->{$key})) { }
1372850TFdefined $_->{'value'} && !ref($_->{'value'}) && length $_->{'value'} ? :
1374050TFif @shared > $MAP_OUTLINE_GROUPS_MAX
13743100TF@none ? :
1376350TFunless @rows and @{$columns;}
1376750TFdefined $cell && !ref($cell) ? :
1377450TFscalar @{$hit;} == scalar @rows ? :
13798100TFdefined $value && !ref($value) ? :
13799100TFlength $key ? :
13808100TFref $place eq 'HASH' ? :
13809100TFdefined $value && !ref($value) ? :
13810100TFunless exists $reason{$key}
13817100TFref $row eq 'HASH' ? :
13818100TFdefined $cell && !ref($cell) ? :
13823100TFif ($total)
13828100TFunless scalar @{$hit;} == $total
13833100TFunless ref $row eq "HASH"
13840100TFdefined $cell && !ref($cell) && length $cell ? :
13856100TFdefined $region && !ref($region) && $region =~ /\A[A-Za-z]{2}\z/u ? :
1420150TFif $share < 0
1420250TFif $share > 1
14290100TFif ($distinct->[0] > 0) { }
1432550TFif $share < 0
1432650TFif $share > 1
14329100TFif $from >= $#OUTLINE_STOPS
14340100TFif abs $n < $KEY_ROUND_FROM
1435050TFif $text =~ /\./u
14352100TFif $text eq "-0"
14355100TFdefined $fraction ? :
1436450TFunless defined $value and not ref $value and length $value
14366100TFgrep({$_ eq $value;} 'Database::BI::Model::Boundary'->levels) ? :
1500650TFunless defined $version and length $version
150090TF$new_enough ? :
15038100TFunless defined $html and length $html
15061100TFif CORE::index(substr($body, length $blank), "(function () {") == 0
15072100TFunless length $suffix
15122100TFif (length $tiles_name)
1512450TFunless (exists $sources->{$tiles_name})
1513450TFif (length $zoom_raw and $zoom_raw =~ /\A\d+\z/u)
151360TFif $zoom_val < 0
151370TFif $zoom_val > 19
1514150TFif (length $max_zoom_raw and $max_zoom_raw =~ /\A\d+\z/u) { }
151430TFif $max_zoom_val < 0
151440TFif $max_zoom_val > 28
1514750TFif defined $cfg_max_zoom and $cfg_max_zoom =~ /\A\d+\z/u
15154100TFunless defined $loc_text
15158100TFif (length $bounds_raw)
15160100TFunless defined $bounds_level
15165100TFunless $by_location or length $lat_col or length $lon_col
15167100TFunless $by_location or length $lat_col and length $lon_col
15171100TFunless defined $records
1517550TFif ($@)
15188100TFunless $geocode_mode =~ /\A(?:wait|cached|)\z/u
1519450TFunless $self->_reduce_or_render(\$records, \$columns)
1519850TFif length $_ and not $loc_set{$_}
1520950TFif (length $color_col and not $col_set{$color_col})
1521250TFif length $color_col and length $series_col
1521550TFif length $size_col and not $col_set{$size_col}
15218100TFif (length $series_col)
1522050TFunless $col_set{$series_col}
1522250TFunless $SCATTER_SCHEMES{$scheme}
1522850TFdefined $value ? :
1523450TFif @series_cats > $limit
15250100TFif @popup
15251100TFif length $color_col
15252100TFif @$color_rules
15254100TFif length $size_col
15255100TFif length $series_col
15257100TFif defined $max and $max =~ /\A\d+\z/u and $max > 0
1525850TFif defined $zoom_val
1525950TFif defined $max_zoom_val
1526050TFif defined $tile_url_override
15261100TFif $heat
15262100TFif defined $bounds_level
1526350TFif length $weight_col and $col_set{$weight_col}
15265100TFif length $shade_col and $col_set{$shade_col}
15266100TFif defined $shade_color and defined $options{'shade'}
15267100TFif $progress or $geocode_mode eq "cached"
1527350TF$back =~ m[\A(?:https?://[^/]+)?/(?:open\?|view/)]u ? :
15278100TFif $rows_base eq "/" or not @{$filters;}
15279100TF$rows_base =~ /\?/u ? :
15288100TF$by_location ? :
15297100TFif $result->{'error'}
15315100TFif defined $mode
15322100TF$progress ? :
15325100TF$progress ? :
15327100TFif @bounds_pending
15329100TFif (@pending or @bounds_pending)
1535250TFif $geocode_mode eq "cached" and grep {$_->{'reason'} eq "later";} @unplotted
15392100TF$geocode_mode eq 'wait' ? :
50TF@loc_cols > 1 ? :
50TF$back2 ? :
50TF$back2 ? :
15442100TFunless length $point and length $sig and defined $level
15444100TFunless secure_compare($sig, $self->_geo_boundary_sig($level, $point))
15447100TF$self->param('online') // 1 ? :
1544950TFunless $answer
15458100TF$answer->{'status'} eq 'held' ? :
50TF$answer->{'status'} eq 'held' && $answer->{'asked'} ? :
15484100TFunless length $place and length $sig
15486100TFunless secure_compare($sig, $self->_geo_lookup_sig($place))
1549050TF$self->param('online') // 1 ? :
1549450TFdefined $region ? :
155030TFgrep({$_ eq $place;} @{$$result{'skipped'};}) ? :
50TFgrep({$_ eq $place;} @{$$result{'unresolved'};}) ? :
100TF$result->{'points'}{$place} ? :
15509100TFif ($result->{'counts'}{'attempted'} and $status ne "held")
15512100TFdefined $backend ? :
50TF$self->_write_models('Database::BI::Model::Geocode'->models_with_shared_cache($models, {$place, $result->{'cache'}{$place}}, defined $backend ? ('backend', $backend) : (), 'built', _iso8601_utc())) ? :
1552650TF$stored ? :
50TFgrep({$_->{'key'} eq 'warn_map_geocoder_online_failed';} @{$$result{'messages'};}) ? :
15543100TFref $rows eq 'ARRAY' ? :
15544100TFif defined $_ and not ref $_
100TFref $columns eq 'ARRAY' ? :
15546100TFdefined $v && !ref($v) ? :
15549100TFif @rows > 1
15555100TFif (keys %seen > 1) { }
100TFelsif (@rows) { }
15562100TFunless @differ
15567100TF@rows > $limit ? :
15576100TFif (my $more = @rows - @shown)
15577100TFdefined $more_url && length $more_url ? :
15593100TFunless defined $col and length $col
15598100TFunless defined $row
15600100TFunless defined $value
15601100TFif not defined $min or $value < $min
15602100TFif not defined $max or $value > $max
15616100TFunless defined $value
15617100TFunless defined $min and defined $max and $max > $min
15620100TFif $fraction < 0
15621100TFif $fraction > 1
15634100TFunless defined $value and $value =~ /\A\d{1,$MAX_WHOLE_NUMBER_DIGITS}\z/u and $value > 0
15646100TFunless defined $c and length $c
15648100TFif $NAMED_COLORS{$c}
15649100TFif $c =~ /\A#[0-9a-f]{3}\z/u
15650100TFif $c =~ /\A#[0-9a-f]{6}\z/u
15665100TFunless defined $op and defined $val and defined $color_str
15667100TFunless $op =~ /\A(?:gt|ge|lt|le|eq|ne)\z/u
15669100TFunless defined $color
15688100TFunless ref $rules eq "ARRAY"
15691100TFunless ref $rule eq "HASH"
15697100TFlength $val ? :
100TF$is_series ? :
15701100TFif @entries and not $is_series
15748100TFunless ref $rules eq "ARRAY"
15750100TFunless ref $rules->[$index] eq "HASH"
15755100TFif ($value =~ /\A-?\d+(?:\.\d+)?\z/u and $threshold =~ /\A-?\d+(?:\.\d+)?\z/u) { }
15768100TFif $match
15780100TFdefined $index ? :
15817100TFunless defined $color and length $color
15818100TFif $color =~ /\A#[0-9a-f]{3}(?:[0-9a-f]{3})?\z/u
1588950TFif $self->buffer_is_cached
1589450TFif (-d $dir)
1589750TFunless $mf->to_string =~ /$ext_re/u
16009100TFunless $id =~ /\A[A-Za-z0-9]+\z/u
16014100TFunless exists $analyses->{$id}
16020100TF$self->_share_links_last ? :
16041100TFunless ref $alerts eq "HASH"
1604350TFunless ref $list eq "ARRAY"
1604450TFif @$list > $ALERT_MAX_THRESHOLDS
1604850TFunless ref $t eq "HASH"
1605050TFunless defined $t->{$k} and not ref $t->{$k} and length $t->{$k}
1605350TFunless length $t->{'measure'} <= 200 and not $t->{'measure'} =~ /[\x00-\x1f\x7f:|]/u
16055100TFunless $ops{$t->{'op'}}
16057100TFunless $t->{'value'} =~ /\A-?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[eE][+-]?[0-9]+)?\z/u
16058100TFif (defined $t->{'fn'} or defined $t->{'col'})
1606050TFunless defined $t->{'fn'} and not ref $t->{'fn'} and $fns{$t->{'fn'}}
16062100TFif $t->{'fn'} ne "count" and not defined $t->{'col'} && !ref($t->{'col'}) && length $t->{'col'}
1606450TFif defined $t->{'col'} and ref $t->{'col'} || length $t->{'col'} > 200 || $t->{'col'} =~ /[\x00-\x1f\x7f]/u
1606750TFif (defined $alerts->{'suppress'} and ref $alerts->{'suppress'} || length $alerts->{'suppress'})
16069100TFunless not ref $alerts->{'suppress'} and defined Database::BI::Alert::parse_duration($alerts->{'suppress'})
16079100TFref $a->{'alerts'} eq 'HASH' ? :
16081100TFref $al->{'thresholds'} eq 'ARRAY' ? :
16083100TFdefined $al->{'suppress'} && !ref($al->{'suppress'}) ? :
100TF$al->{'recovery'} ? :
1610550TFunless $id =~ /\A[A-Za-z0-9]+\z/u
1610850TFunless $a
1611550TFif @recent > $ALERT_RECENT
1612250TF$a->{'datasets'} && $a->{'datasets'}[0] ? :
50TF$self->app->config('alert_notify_cmd') ? :
50TFdefined $every && length $every ? :
1613550TFunless $id =~ /\A[A-Za-z0-9]+\z/u
1613850TFunless $self->_read_analyses->{$id}
1613950TFlength($self->req->body // '') ? :
1614050TFunless ref $body eq "HASH"
16143100TF$body->{'dry'} ? :
16144100TFif $r->{'error'}
1616350TFunless ref $c and defined $id
1616450TFunless my $a = $c->_read_analyses->{$id}
16167100TFunless @{$of->{'thresholds'};}
16170100TFunless defined $state_path
1617250TF$a->{'datasets'} && $a->{'datasets'}[0] ? :
1617350TFdefined $spec ? :
16174100TF$source ? :
16175100TFunless ref $records eq "ARRAY"
16180100TF$o{'dry'} ? :
1618550TFif defined $problem
1620850TFif (not $dry and @announced and defined $command and length $command)
1621050TF@crossings == 1 ? :
100TFif @crossings
1621150TF@recoveries == 1 ? :
100TFif @recoveries
16212100TF@crossings ? :
50TF@announced == 1 ? :
16217100TF$ok ? :
16218100TFunless ($ok)
16226100TFunless ($dry or $failed)
16227100TFif ($outcome->{'changed'})
1622950TFunless $ok
16231100TFif (@announced)
1623350TFunless $ok
1625350TFunless defined $run_path
16259100TFif $run->{'last_run'} and $now - $run->{'last_run'} < $every * "0.9"
1626650TFunless @{_alerts_of($all->{$id})->{'thresholds'};}
1626850TFif (not $r or $r->{'error'})
162690TF$r ? :
16281100TFunless $id =~ /\A[A-Za-z0-9]+\z/u
16283100TFunless length $token
16285100TFunless ($self->_verify_share_token($id, $token))
16291100TFunless exists $analyses->{$id}
16295100TFunless (@visuals)
16310100TFunless $id =~ /\A[A-Za-z0-9]+\z/u
16312100TFunless length $token
16314100TFunless ($self->_verify_share_token($id, $token))
16320100TFunless exists $analyses->{$id}
16330100TFif @framers
16333100TFunless (@visuals)
1634150TFif $ctx->{'error'}
1635150TFif length($card->{'head'} // "")
16383100TFunless $id =~ /\A[A-Za-z0-9]+\z/u
16385100TFunless $format =~ /\A(?:csv|png)\z/u
16387100TFunless $n =~ /\A\d+\z/u
16392100TFunless exists $analyses->{$id}
16396100TFunless $n < scalar @visuals
16399100TFif ($visuals[$n]{'kind'} // "") eq "text"
16401100TFif ($format eq "csv")
16406100TFif $ctx->{'error'}
16442100TFunless length $api_key
16446100TFunless length $left_spec
16450100TFunless length $question
16452100TFif length $question > $ASK_MAX_QUESTION
1645650TFunless defined $records
1646250TF$records->$#* < 199 ? :
16473100TFunless _ai_call_allowed($self)
16484100TFif (my $err = $result->{'error'})
1648550TF$err =~ /\Aask_invalid_spec:(.+)\z/u ? :
100TF$err eq 'ask_unparseable' ? :
100TF$err eq 'ask_provider_error' ? :
50TF$err eq 'ask_no_question' ? :
50TF$err eq 'ask_unavailable' ? :
16515100TFunless length $left_spec
16519100TFunless defined $records
1652350TFif ($@)
1652550TFunless $self->_reduce_or_render(\$records, \$columns)
16537100TF$self->param('ai') ? :
16564100TFdefined $n && $n =~ /\A\d+\z/u ? :
16576100TFunless $max
16580100TFif @{$calls;} >= $max
16602100TFunless length $left_spec
16610100TFunless defined $records
1661450TFif ($@)
16616100TFunless $self->_reduce_or_render(\$records, \$columns)
1663050TFlength($self->app->config('ai_api_key') // '') ? :
50TF$back2 ? :
50TF$back2 ? :