samples/sess_backed/2/util/find_yatt_lib.pl

filter: Statementstmt 74.1% 23 / 31 Branchbran 33.3% 2 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 72.0% 31 / 43 CC 1 SCAR 0.0
CC
1
Cov
68%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/YATT/Lite/Breakpoint.pm ↑ Summary t/scripts/render.ytmpl/3/index.yatt »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use File::Basename ();
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use File::Spec;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Cwd ();
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use constant DEBUG_FIND_YATT_LIB => $ENV{DEBUG_FIND_YATT_LIB};
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 my $thisdir = do {
10 1 ▶ if (-r __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if (-r __FILE__) { } 1 0 1
11 # detect where app.psgi is placed.
12 1 File::Basename::dirname(File::Spec->rel2abs(__FILE__));
13 } else {
14 # older uwsgi do not set __FILE__ correctly, so use cwd instead.
15 0 Cwd::cwd();
16 }
17 };
18 1 print STDERR "# thisdir=$thisdir\n" if DEBUG_FIND_YATT_LIB;
19  
20 1 ▶my ($found) = $thisdir =~ m{^(.*?/)YATT/samples(?:/|\z)}
Branch: 1 branch
BranchTrueFalseTotal
my($found) = $thisdir =~ m[^(.*?/)YATT/samples(?:/|\z)] or return 0 1 1
21 or return;
22 0 print STDERR "# found=$found\n" if DEBUG_FIND_YATT_LIB;
23  
24 0 my @libdir = $found;
25  
26 0 foreach my $d (qw(extlib local/lib/perl5)) {
27 0 ▶ -d (my $dn = File::Basename::dirname($found) . "/$d")
Branch: 1 branch
BranchTrueFalseTotal
-d (my $dn = File::Basename::dirname($found) . "/$d") or next 0 0 0
28 or next;
29 0 push @libdir, $dn;
30 }
31 0 print STDERR "# libdir=@libdir\n" if DEBUG_FIND_YATT_LIB;
32  
33 0 return @libdir;
« blib/lib/YATT/Lite/Breakpoint.pm ↑ Summary t/scripts/render.ytmpl/3/index.yatt »