Dash/Html/ComponentsAssets.pm

filter: Statementstmt 68.0% 17 / 25 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod n/a totaltotal 59.4% 22 / 37 CC 3 SCAR 15.0
CC
3
Cov
59%
_deps
12.0
_js_dist
2.0
_css_dist
2.0
CRAP 4.5
« Dash/Core/ComponentsAssets.pm ↑ Summary Dash/Renderer.pm »
1 package Dash::Html::ComponentsAssets;
2  
3 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 8 ▶use JSON;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 8 ▶use File::ShareDir;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 8 ▶use Path::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 8 my $_deps;
10  
11 0 ▶sub _deps {
Subroutine _deps: not called CC=3 SCAR=24.8
12 0 my $kind = shift;
13 0 ▶ if ( !defined $_deps ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_deps) 0 0 0
14 0 $_deps = from_json(
15 Path::Tiny::path(
16 File::ShareDir::dist_file(
17 "Dash", Path::Tiny::path( "assets", "dash_html_components", "js_deps.json" )->canonpath
18 )
19 )->slurp_utf8
20 );
21 }
22 0 ▶ if ( defined $kind ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $kind) 0 0 0
23 0 return $_deps->{$kind};
24 }
25 0 return $_deps;
26 }
27  
28 0 ▶sub _js_dist {
Subroutine _js_dist: not called CC=1 SCAR=6.9
29 0 return _deps("_js_dist");
30 }
31  
32 0 ▶sub _css_dist {
Subroutine _css_dist: not called CC=1 SCAR=6.9
33 0 return _deps("_css_dist");
34 }
35  
36 8 1;
37  
38 __END__
« Dash/Core/ComponentsAssets.pm ↑ Summary Dash/Renderer.pm »