website/gen

filter: Statementstmt 100% 28 / 28 Branchbran 41.6% 5 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 84.7% 39 / 46 CC 3 SCAR 6.0
CC
3
Cov
82%
BEGIN
3.2
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« lib/FP/OrderedCollection.pm ↑ Summary functional_XML/testlazy »
1 #!/usr/bin/env perl
2  
3 # Copyright (c) 2015-2019 Christian Jaeger, copying@christianjaeger.ch
4 # This is free software. See the file COPYING.md that came bundled
5 # with this file.
6  
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use warnings FATAL => 'uninitialized';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 ▶use Cwd 'abs_path';
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 our ($mydir, $myname);
13  
14 1 ▶BEGIN {
Subroutine BEGIN: called CC=3 SCAR=11.7
15 1 ▶ my $location = (-l $0) ? abs_path($0) : $0;
Branch: 1 branch
BranchTrueFalseTotal
-l $0 ? : 0 1 1
16 1 ▶ $location =~ /(.*?)([^\/]+?)_?\z/s or die "?";
Branch: 1 branch
BranchTrueFalseTotal
$location =~ m[(.*?)([^/]+?)_?\z]s or die "?" 1 0 1
17 1 ($mydir, $myname) = ($1, $2);
18 }
19  
20 1 ▶unless ($ENV{SUB_CALL_TAIL}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($ENV{"SUB_CALL_TAIL"}) 1 0 1
21 1 ▶ use lib "./meta";
Subroutine BEGIN: called CC=1 SCAR=0.0
22 1 require FunctionalPerl::TailExpand;
23 }
24  
25 1 ▶chdir $mydir or die "chdir $mydir: $!";
Branch: 1 branch
BranchTrueFalseTotal
chdir $main::mydir or die "chdir $main::mydir: $!" 1 0 1
26  
27 1 my $inbase = "..";
28 1 my $outbase = "www";
29 1 my $configpath = "./gen-config.pl";
30  
31 # make it work by default without Sub::Call::Tail:
32 1 ▶my $prefix = $ENV{SUB_CALL_TAIL} ? "" : ".";
Branch: 1 branch
BranchTrueFalseTotal
$ENV{'SUB_CALL_TAIL'} ? : 0 1 1
33  
34 1 my $gen = "../${prefix}htmlgen/gen";
35  
36 1 ▶exec $^X, $gen, $configpath, $inbase, $outbase, @ARGV
Branch: 1 branch
BranchTrueFalseTotal
exec $^X, $gen, $configpath, $inbase, $outbase, @ARGV or die "possibly missing '${gen}', run 'meta/tail-expand' (or simply 'make test') first" 0 0 0
37 or die
38 "possibly missing '$gen', run 'meta/tail-expand' (or simply 'make test') first";
« lib/FP/OrderedCollection.pm ↑ Summary functional_XML/testlazy »