Branch Coverage

blib/lib/YATT/Lite/Factory.pm
Criterion Covered Total %
branch 72 138 52.1


line true false branch
127 0 0 unless my($found) = $pack->find_factory_script(delete $opts{'dir'})
128 0 0 unless my $self = $pack->load_factory_script($found)
141 0 0 if ($self->{'cf_offline'})
153 0 0 unless (defined $psgi)
156 0 0 unless (-r $psgi)
165 0 0 unless (-d $app_root)
170 0 0 if (-d "$app_root/ytmpl")
173 0 0 if (my(@cf) = map({my $cf = "$app_rootname.$_"; -e $cf ? $cf : ();} $pack->default_config_filetypes)) { }
175 0 0 -e $cf ? :
177 0 0 if @cf > 1
196 0 4 if ($cascade) { }
215 0 1 if (ref $sub eq 'CODE') { }
1 0 elsif ($sub->isa($pack) or $sub->isa('YATT::Lite::Factory')) { }
230 0 1 if (wantarray) { }
236 1 0 unless (*{$sym;}{'CODE'})
239 0 1 wantarray ? :
249 1 0 if 'FindBin'->can('again')
250 1 0 if ($fn =~ /\.psgi$/) { }
263 0 0 if (my($found) = grep({-r $_;} map({"$dir/$_.psgi";} 'runyatt', 'app')))
284 0 18 if ($self->{'cf_no_unicode'}) { }
313 0 18 if (not $self->{'cf_allow_missing_dir'} and $self->{'cf_doc_root'} and not -d $self->{'cf_doc_root'})
318 18 0 if ($self->{'cf_doc_root'})
326 18 0 if (my $dir = $self->{'cf_doc_root'})
343 0 0 ref $reqrec ? :
349 0 0 unless (@pi)
353 0 0 unless (my $dh = $self->get_lochandler(map({untaint_any($_);} $loc, $tmpldir)))
363 0 0 @rest ? :
390 19 3 unless $path_info =~ /$self->{'loc2psgi_re'}/
391 0 3 unless my(@mount_match) = grep({/^@{['__yatt'];}/o;} keys %+)
393 0 3 if (@mount_match >= 2)
402 0 3 wantarray ? :
407 0 3 unless (defined $path_prefix)
410 3 0 unless (ref $path_prefix)
442 0 0 ref $realpath eq 'CODE' ? :
461 0 10 if (my $ref = ref $path_info)
466 0 10 unless (@pi)
469 0 10 unless ($is_index)
546 0 31 unless ($self->get_yatt($location))
555 0 58 if (my $yatt = $self->{'loc2yatt'}{$loc})
561 0 58 unless ($realdir)
572 53 36 if (my $yatt = $self->{'path2yatt'}{$path})
575 23 13 if (not $visits) { }
1 12 elsif (my $preds = $visits->check_cycle($path, $from)) { }
582 0 35 unless ($self->{'cf_allow_missing_dir'} or -d $path)
585 13 22 if (my(@cf) = map({my $cf = untaint_any($path) . "/.htyattconfig.$_"; -e $cf ? $cf : ();} $self->config_filetypes)) { }
587 13 57 -e $cf ? :
589 0 13 if @cf > 1
616 4 28 if (-e (my $rc = "$path/.htyattrc.pl"))
635 11 21 @basevfs ? :
637 0 32 if (my(@unk) = $app_ns->YATT::Lite::Object::cf_unknowns(%opts))
655 12 23 unless my($base, @mixin) = lexpand($desc)
663 5 22 if ($basespec =~ /^::(.*)/) { }
22 0 elsif (my $realpath = $self->app_path_find_dir_in($in, $basespec)) { }
667 7 15 if ($is_implicit)
668 4 3 if $visits->has_node($realpath)
680 5 18 unless $dir
689 16 4 $is_primary && $pkg ? :
707 31 1 unless (*{$my;}{'CODE'})
713 6 26 unless ($newns->EntNS->isa($self->EntNS))
752 32 0 exists $hash->{'cf_error_handler'} ? :
767 21 14 if ($basedir) { }
775 5 9 if (defined(my $app_name = $self->_extract_app_name($path, $cp)))
787 10 28 unless $bs eq $basedir
796 0 15 unless my($ext) = $fn =~ /\.(\w+)$/
798 0 15 unless my $sub = $self->can("read_file_$ext")
806 0 35 if (my $item = $self->{'cf_config_filetypes'}) { }
824 2 0 wantarray ? :
835 0 70 if (not defined $_[0] && $_[0] ne '') { }
839 0 70 $^O =~ /^MSWin/ ? :