Branch Coverage

blib/lib/RapidApp/Util.pm
Criterion Covered Total %
branch 19 220 8.6


line true false branch
85 0 0 unless $_ eq 'no_caller_data' or ref $_ eq 'ARRAY' and scalar @$_ == 3 and ref $_->[0] eq 'HASH' and defined $_->[0]{'package'}
88 0 0 if scalar @_ > 1
89 0 0 if ref $data
90 0 0 unless defined $data
94 0 0 $_->[2]{'subroutine'} ? :
0 0 unless $_ eq 'no_caller_data'
115 0 0 if ref $args[0] eq 'HASH'
116 0 0 if ref $args[0] eq 'ARRAY'
121 0 0 if (ref $item)
122 0 0 unless ref $item eq 'HASH' and defined $last and not ref $last
127 0 0 unless defined $hashref->{$item}
137 0 0 if ref $args[0] eq 'HASH'
138 0 0 if ref $args[0] eq 'ARRAY'
144 0 0 if (ref $item)
145 0 0 unless ref $item eq 'HASH' and defined $last and not ref $last
150 0 0 unless defined $hashref->{$item}
151 0 0 unless ref $last
161 1631 1339 ref $v && ref $v eq 'SCALAR' ? :
169 0 0 unless ref $ref eq 'CODE'
184 0 0 if $h->{'package'}
205 0 0 if ($regex and not eval '$item->{subroutine} =~ /' . $regex . '/')
209 0 0 if $seq
223 23636 0 defined $_ ? :
9879 184 unless @_ == 1 and ref $_[0] eq 'ARRAY'
224 0 184 unless @{$_[0];} > 0
234 0 0 if @_ > 0
235 0 0 if $type eq 'SCALAR'
236 0 0 if $type eq 'ARRAY'
237 0 0 if $type eq 'HASH'
247 0 0 (caller 1)[3] eq 'RapidApp::Util::disp' ? :
249 0 0 $recurse ? :
250 0 0 if ref $_[0] eq 'CODE' and @_ > 1 and $recurse == 0
251 0 0 if ($_{'code'})
254 0 0 if defined $cust
257 0 0 if @_ > 1
259 0 0 unless defined $val
260 0 0 if (ref $val)
261 0 0 if ref $val eq 'ARRAY'
262 0 0 if ref $val eq 'SCALAR'
263 0 0 if ref $val eq 'HASH'
274 0 6 unless defined $max_length and $max_length =~ /^\d+$/ and $max_length > 0
280 3 3 unless defined $str
281 0 3 if (ref $str)
294 3 0 if $length <= $max_length
308 0 0 if ref $method eq 'ARRAY'
310 0 0 ref $_[0] eq 'HASH' ? :
325 0 0 if (scalar @namespace > 1)
330 0 0 if $$debug_arounds_set{$package . '->' . $method}++
336 0 0 if ($package->can('around'))
351 0 0 ref $_[0] eq 'HASH' ? :
377 0 0 if $opt{'newline'}
381 0 0 if $opt{'verbose'} and not defined $opt{'verbose_in'}
382 0 0 if $opt{'verbose'} and not defined $opt{'verbose_out'}
386 0 0 unless @_ > 0 and defined $_[0]
389 0 0 ref $_ ? :
0 0 $opt{'list_out'} ? :
0 0 unless $verbose
393 0 0 unless $opt{'use_json'}
396 0 0 unless $opt{'dump_func'}
406 0 0 $debug_around_last_nest_level < $nest_level ? :
407 0 0 $debug_around_last_nest_level > $nest_level ? :
410 0 0 if $nest_level == 0
412 0 0 $nest_level > 0 ? :
418 0 0 if ($opt{'list_args'})
419 0 0 ref $_ && ++$has_refs ? :
424 0 0 if ($opt{'stack'}) { }
442 0 0 if $new_nest
452 0 0 if $has_refs and $opt{'verbose_in'}
464 0 0 if (wantarray) { }
486 0 0 if ($opt{'track_stats'})
499 0 0 exists $stats->{'min'} ? :
0 0 exists $stats->{'max'} ? :
502 0 0 if $adj_elapsed < $stats->{'min'}
503 0 0 if $adj_elapsed > $stats->{'max'}
508 0 0 if (not $opt{'arg_ignore'}->(@args) || $opt{'return_ignore'}->(@res_copy)) { }
518 0 0 if $opt{'verbose_out'}
519 0 0 if $opt{'time'}
524 0 0 unless $debug_around_last_nest_level == $nest_level
539 0 0 wantarray ? :
563 0 0 unless -e $file
577 0 0 unless scalar @_ == 1
583 0 0 unless scalar @_ == 1 and ref $_[0] eq ''
590 0 2093 unless my $js = shift()
592 584 1509 if ref $js eq 'ARRAY'
594 0 1509 if &blessed($js) and not $js->can('TO_JSON_RAW')
597 1 1508 if &blessed($js)
602 727 782 if scalar @_ > 0
624 0 0 if ref $text and ref($text)->isa('RapidApp::HTML::RawHtml')
625 0 0 unless defined $text
661 0 0 unless defined $msg
664 0 0 if ref $msg and ref($msg)->isa('RapidApp::Responder::UserError')
666 0 0 ref $msg && ref($msg)->isa('RapidApp::HTML::RawHtml') ? :
672 0 0 unless 'RapidApp::Responder::UserError'->can($key)
679 0 0 if (scalar @_)
709 0 0 unless defined $msg
710 0 0 ref $msg && ref($msg)->isa('RapidApp::HTML::RawHtml') ? :
717 0 0 unless 'RapidApp::Error'->can($key)
723 0 0 if (scalar @_)
783 0 0 if @_ == 1
799 0 0 if scalar(@_) % 2 and not ref $_[0]
801 0 0 ref $_[0] && ref $_[0] eq 'HASH' ? :
804 0 0 unless $msg
806 0 0 unless my $c = 'RapidApp'->active_request_context
811 0 0 unless $c->is_ra_ajax_req
834 0 0 if (my $button = $c->req->header('X-RapidApp-CustomPrompt-Button'))
867 0 0 if $_[0] and $_[0] eq 'RapidApp::Util'
872 0 0 unless my $class = shift()
876 0 0 unless ($path)
879 0 0 unless ($INC{$file})
880 0 0 if (my $pm_path = Module::Locate::locate($class))