Dash/Renderer.pm

filter: Statementstmt 65.3% 17 / 26 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 55.5% 5 / 9 Podpod n/a totaltotal 56.4% 22 / 39 CC 3 SCAR 14.5
CC
3
Cov
57%
_deps
12.0
_js_dist
2.0
_css_dist
2.0
CRAP 4.3
« Dash/Html/ComponentsAssets.pm ↑ Summary Dash/Dependencies.pm »
1 package Dash::Renderer;
2  
3 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 6 ▶use JSON;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 6 ▶use File::ShareDir;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 6 ▶use Path::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 6 my $_deps;
11  
12 0 ▶sub _deps {
Subroutine _deps: not called CC=3 SCAR=24.8
13 0 my $kind = shift;
14 0 ▶ if ( !defined $_deps ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_deps) 0 0 0
15  
16 # TODO recover from __PACKAGE__ variable
17 0 $_deps = from_json(
18 Path::Tiny::path(
19 File::ShareDir::dist_file(
20 'Dash', Path::Tiny::path( 'assets', 'dash_renderer', 'js_deps.json' )->canonpath
21 )
22 )->slurp_utf8
23 );
24 }
25 0 ▶ if ( defined $kind ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $kind) 0 0 0
26 0 return $_deps->{$kind};
27 }
28 0 return $_deps;
29 }
30  
31 0 ▶sub _js_dist {
Subroutine _js_dist: not called CC=1 SCAR=6.9
32 0 return _deps('_js_dist');
33 }
34  
35 0 ▶sub _css_dist {
Subroutine _css_dist: not called CC=1 SCAR=6.9
36 0 return _deps('_css_dist');
37 }
38  
39 0 ▶sub _js_dist_dependencies {
Subroutine _js_dist_dependencies: not called CC=1 SCAR=6.9
40 0 return _deps('_js_dist_dependencies');
41 }
42  
43 6 1;
44  
45 __END__
« Dash/Html/ComponentsAssets.pm ↑ Summary Dash/Dependencies.pm »