lib/Kwiki/Theme.pm

filter: Statementstmt 46.3% 19 / 41 Branchbran 0.0% 0 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod 33.3% 1 / 3 totaltotal 39.3% 24 / 61 CC 6 SCAR 30.8
CC
6
Cov
37%
init
42.0
register
2.0
resolve_install_path
2.0
CRAP 21.7
« lib/Kwiki/Display.pm ↑ Summary lib/Kwiki/Config.pm »
1 package Kwiki::Theme;
2 1 ▶use Kwiki::Plugin -Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use mixin 'Kwiki::Installer';
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 const class_id => 'theme';
6  
7 0 ▶sub register {
Subroutine register: not called CC=1 SCAR=6.9
Pod undocumented
8 0 my $register = shift;
9 0 $register->add(preload => 'theme',
10 priority => 1,
11 );
12 0 $register->add(prerequisite => 'toolbar');
13 0 $register->add(prerequisite => 'widgets');
14 0 $register->add(prerequisite => 'status');
15 }
16  
17 1 const default_template_path => "theme/%s/template/tt2";
18 1 const default_css_path => "theme/%s/css";
19 1 const default_javascript_path => "theme/%s/javascript";
20  
21 1 const default_css_file => 'kwiki.css';
22 1 const default_javascript_file => '';
23  
24 0 ▶sub init {
Subroutine init: not called CC=6 SCAR=37.4
Pod documented
25 0 super;
26 0 my $theme_id = $self->theme_id;
27 0 my $template_path =
28 sprintf $self->default_template_path, $theme_id;
29 0 ▶ $self->template->add_path($template_path)
Branch: 1 branch
BranchTrueFalseTotal
if -e $template_path 0 0 0
30 if -e $template_path;
31  
32 0 my $css_path =
33 sprintf $self->default_css_path, $theme_id;
34 0 ▶ $self->hub->css->add_path($css_path)
Branch: 1 branch
BranchTrueFalseTotal
if -e $css_path 0 0 0
35 if -e $css_path;
36 $self->hub->css->add_file
37 (ref $self->default_css_file
38 0 ▶ ? @{$self->default_css_file}
Branch: 1 branch
BranchTrueFalseTotal
ref $self->default_css_file ? : 0 0 0
39 : $self->default_css_file);
40  
41 0 my $javascript_path =
42 sprintf $self->default_javascript_path, $theme_id;
43 0 ▶ $self->hub->javascript->add_path($javascript_path)
Branch: 1 branch
BranchTrueFalseTotal
if -e $javascript_path 0 0 0
44 if -e $javascript_path;
45 $self->hub->javascript->add_file
46 (ref $self->default_javascript_file
47 0 ▶ ? @{$self->default_javascript_file}
Branch: 1 branch
BranchTrueFalseTotal
ref $self->default_javascript_file ? : 0 0 0
48 : $self->default_javascript_file);
49  
50 0 $self->hub->cookie;
51 }
52  
53 0 ▶sub resolve_install_path {
Subroutine resolve_install_path: not called CC=1 SCAR=6.9
Pod undocumented
54 0 sprintf shift, $self->theme_id;
55 }
56  
57 1 __DATA__
« lib/Kwiki/Display.pm ↑ Summary lib/Kwiki/Config.pm »