Branch Coverage

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


line true false branch
55 7041 1 if ($class =~ /^(.+?)::([MVC]|Model|View|Controller)::.+$/)
71 1 0 if ($class =~ /^(.+?::([MVC]|Model|View|Controller))::.+$/)
117 6020 157 if ($class =~ /^.+?::([MVC]|Model|View|Controller)::(.+)$/)
118 0 6020 $case ? :
140 0 0 if ($create and not -e $tmpdir)
143 0 0 unless (eval {
194 253 80 if (my $inc_entry = $INC{$file})
200 1 252 unless defined $path and length $path
207 7 246 if (grep {-f $home->file($_);} dist_indicator_file_list())
229 218 28 if -d $home
248 0 0 if $prefix
260 780 140 unless (ref $request)
261 534 246 if ($request =~ /^http/i) { }
268 780 140 unless (ref $request eq "HTTP::Request")
289 0 6915 if $class =~ /(?:\b\:\b|\:{3,})/
292 2 6913 if $class =~ /[^\w:]/
295 0 6913 if $class =~ /\.pm$/
302 49 6864 if not $opts->{'ignore_loaded'} and is_class_loaded($class)
314 2 6862 if $error
316 1 6861 unless is_class_loaded($class)
331 747 21764 unless defined $righthash
337 81 8732 if ($right_ref and $left_ref) { }
365 26 2100 if (defined(my $value = $ENV{"${prefix}_$key"}))
403 0 68 if $force_reset
405 60 8 if $_term_width
407 0 8 if ($ENV{'COLUMNS'} and $ENV{'COLUMNS'} =~ /\A\d+\z/)
411 8 0 unless (-t STDOUT or -t STDERR)
415 0 0 unless (defined $_use_term_size_any)
421 0 0 unless (eval {
422 0 0 if ($@ =~ m[Can't locate Term/Size/Any\.pm]) { }
434 0 0 if ($_use_term_size_any)
438 0 0 if (not $width or $width < 80)
461 1560 667 defined $appnamespace ? :
481 3 7 if ($namespace =~ s/^\+// or $namespace =~ /^Plack::Middleware/ or $namespace =~ /^$class/) { }
486 3 0 Class::Load::try_load_class($namespace) ? :
490 0 7 if (Class::Load::try_load_class($class . '::Middleware::' . $namespace)) { }
6 1 elsif (Class::Load::try_load_class("Plack::Middleware::$namespace")) { }
517 956 2 &Scalar::Util::blessed($middleware) ? :
565 0 11 unless $into
566 0 11 unless $component
571 5 0 unless ($as =~ /^(?:Controller|Model|View)::/ or $given{'skip_mvc_renaming'})
574 5 2 if ($component->isa("Catalyst::$_"))
579 0 5 unless $category
584 11 0 unless (Class::Load::is_class_loaded($component_package))
585 0 11 unless eval "package $component_package; use base qw/$component/; 1;"
587 3 8 if $given{'traits'}