Embra/Role/FileGatherer.pm

filter: Statementstmt 100% 26 / 26 Branchbran 50.0% 3 / 6 Conditioncond 66.6% 2 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 86.0% 37 / 43 CC 5 SCAR 11.4
CC
5
Cov
89%
add_file
5.2
BEGIN
1.0
BEGIN
1.0
CRAP 3.1
« Embra/App/Command.pm ↑ Summary Embra/Role/Logging.pm »
1 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package App::Embra::Role::FileGatherer;
5 9 $App::Embra::Role::FileGatherer::VERSION = '0.001'; # TRIAL
6 # ABSTRACT: something that adds file to your site
7  
8 9 ▶use Method::Signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 9 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11  
12 9 with 'App::Embra::Role::Plugin';
13  
14 9 requires 'gather_files';
15  
16  
17 9 ▶method add_file( App::Embra::File $file ) {
Subroutine BEGIN: called CC=1 SCAR=0.2
Subroutine add_file: called CC=5 SCAR=16.6
Branch: 3 branches
BranchTrueFalseTotal
unless scalar @_ > 0 0 21 21
unless ($Method::Signatures::mutc{"cache"}{"App::Embra::File"} ||= "Method::Signatures"->_make_constraint("App::Embra::File"))->check($file) 0 21 21
if scalar @_ > 1 0 21 21
Condition66%2/3
$Method::Signatures::mutc{"cache"}{"App::Embra::File"} ||= "Method::Signatures"->_make_constraint("App::Embra::File")
l!l&&r!l&&!r
1290
MC/DC0%0/2
$Method::Signatures::mutc{"cache"}{"App::Embra::File"} ||= "Method::Signatures"->_make_constraint("App::Embra::File")
$Method::Signatures::mutc{"cache"}{"App::Embra::File"} "Method::Signatures"->_make_constraint("App::Embra::File")
Truth table66%2/3
A ||= B
A= $Method::Signatures::mutc{"cache"}{"App::Embra::File"}B= "Method::Signatures"->_make_constraint("App::Embra::File")
ABresult
1X1
011
000
18 21 $self->debug( "gathered $file" );
19 21 push @{ $self->embra->files }, $file;
20 }
21  
22 9 1;
23  
24 __END__
« Embra/App/Command.pm ↑ Summary Embra/Role/Logging.pm »