Embra/Plugin/Cname.pm

filter: Statementstmt 96.1% 25 / 26 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod n/a totaltotal 91.6% 33 / 36 CC 2 SCAR 2.9
CC
2
Cov
93%
gather_files
2.0
__ANON__
2.0
BEGIN
1.0
CRAP 1.3
« Embra/Plugin/Sitemap.pm ↑ Summary Embra/Plugin/Template/Basic.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::Cname;
5 1 $App::Embra::Plugin::Cname::VERSION = '0.001'; # TRIAL
6 # ABSTRACT: adds a file containing the site's canonical domain name
7  
8 1 ▶use Method::Signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use App::Embra::File;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13  
14  
15 1 has 'domain' => (
16 is => 'ro',
17 required => 1,
18 );
19  
20  
21 has 'filename' => (
22 is => 'ro',
23 0 ▶ default => sub { 'CNAME' },
Subroutine __ANON__: not called CC=1 SCAR=6.9
24 1 );
25  
26 1 ▶method gather_files {
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
27 1 $self->add_file( App::Embra::File->new( name => $self->filename, content => $self->domain ) );
28 }
29  
30 1 with 'App::Embra::Role::FileGatherer';
31  
32 1 1;
33  
34 __END__
« Embra/Plugin/Sitemap.pm ↑ Summary Embra/Plugin/Template/Basic.pm »