Embra/Plugin/Favicon.pm

filter: Statementstmt 100% 33 / 33 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod n/a totaltotal 93.7% 45 / 48 CC 4 SCAR 4.1
CC
4
Cov
92%
__ANON__
2.0
__ANON__
2.0
gather_files
2.0
CRAP 1.5
« Embra/Role/FilePruner.pm ↑ Summary Embra/Plugin/Sitemap.pm »
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  
4 package App::Embra::Plugin::Favicon;
5 1 $App::Embra::Plugin::Favicon::VERSION = '0.001'; # TRIAL
6 # ABSTRACT: adds a favicon
7  
8 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Method::Signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11  
12  
13 has 'filename' => (
14 is => 'ro',
15 1 ▶ default => sub { 'favicon.ico' },
Subroutine __ANON__: called CC=1 SCAR=0.0
16 1 );
17  
18 1 ▶has 'file' => (
Subroutine __ANON__: called CC=2 SCAR=7.1
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ > 0 0 1 1
19 1 is => 'lazy',
20 default => method {
21 1 App::Embra::File->new( name => $self->filename )
22 },
23 1 ▶);
Subroutine __ANON__: called CC=2 SCAR=7.0
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ > 0 0 1 1
24 1  
25 has 'fragment' => (
26 is => 'ro',
27 1 default => method { qq{<link rel="icon" type="image/x-icon" href="${ \ $self->file->name }">} },
28 init_arg => undef,
29 );
30  
31 has 'clipboard' => (
32 is => 'ro',
33 1 default => 'head',
34 init_arg => undef,
35 1 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine gather_files: called CC=2 SCAR=7.0
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ > 0 0 1 1
36 1  
37 with 'App::Embra::Role::Snippet';
38  
39 1 method gather_files {
40 $self->add_file( App::Embra::File->new( name => $self->filename ) );
41 1 }
42  
43 with 'App::Embra::Role::FileGatherer';
44  
45 1;
46  
47 __END__
« Embra/Role/FilePruner.pm ↑ Summary Embra/Plugin/Sitemap.pm »