Branch Coverage

blib/lib/Catalyst/Utils.pm
Criterion Covered Total %
branch 61 92 66.3


line true false branch
54 7038 1 if ($class =~ /^(.+?)::([MVC]|Model|View|Controller)::.+$/)
70 1 0 if ($class =~ /^(.+?::([MVC]|Model|View|Controller))::.+$/)
116 6018 156 if ($class =~ /^.+?::([MVC]|Model|View|Controller)::(.+)$/)
117 0 6018 $case ? :
139 0 0 if ($create and not -e $tmpdir)
142 0 0 unless (eval {
193 253 78 if (my $inc_entry = $INC{$file})
199 1 252 unless defined $path and length $path
206 7 246 if (grep {-f $home->file($_);} dist_indicator_file_list())
228 218 28 if -d $home
247 0 0 if $prefix
259 775 140 unless (ref $request)
260 534 241 if ($request =~ /^http/i) { }
267 775 140 unless (ref $request eq "HTTP::Request")
288 0 6911 if $class =~ /(?:\b\:\b|\:{3,})/
291 2 6909 if $class =~ /[^\w:]/
294 0 6909 if $class =~ /\.pm$/
301 49 6860 if not $opts->{'ignore_loaded'} and is_class_loaded($class)
313 2 6858 if $error
315 1 6857 unless is_class_loaded($class)
330 742 21744 unless defined $righthash
336 81 8728 if ($right_ref and $left_ref) { }
364 26 2088 if (defined(my $value = $ENV{"${prefix}_$key"}))
402 0 68 if $force_reset
404 60 8 if $_term_width
406 0 8 if ($ENV{'COLUMNS'} and $ENV{'COLUMNS'} =~ /\A\d+\z/)
410 8 0 unless (-t STDOUT or -t STDERR)
414 0 0 unless (defined $_use_term_size_any)
420 0 0 unless (eval {
421 0 0 if ($@ =~ m[Can't locate Term/Size/Any\.pm]) { }
433 0 0 if ($_use_term_size_any)
437 0 0 if (not $width or $width < 80)
460 1560 664 defined $appnamespace ? :
480 3 7 if ($namespace =~ s/^\+// or $namespace =~ /^Plack::Middleware/ or $namespace =~ /^$class/) { }
485 3 0 Class::Load::try_load_class($namespace) ? :
489 0 7 if (Class::Load::try_load_class($class . '::Middleware::' . $namespace)) { }
6 1 elsif (Class::Load::try_load_class("Plack::Middleware::$namespace")) { }
516 949 2 &Scalar::Util::blessed($middleware) ? :
564 0 11 unless $into
565 0 11 unless $component
570 5 0 unless ($as =~ /^(?:Controller|Model|View)::/ or $given{'skip_mvc_renaming'})
573 5 2 if ($component->isa("Catalyst::$_"))
578 0 5 unless $category
583 11 0 unless (Class::Load::is_class_loaded($component_package))
584 0 11 unless eval "package $component_package; use base qw/$component/; 1;"
586 3 8 if $given{'traits'}