Embra/Plugin/SnippetsToNotes.pm

filter: Statementstmt 100% 26 / 26 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 97.0% 33 / 34 CC 4 SCAR 8.5
CC
4
Cov
96%
transform_files
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.3
« Embra/Plugin/PublishFiles.pm ↑ Summary Embra/Plugin/TemplateToolkit.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::SnippetsToNotes;
5 1 $App::Embra::Plugin::SnippetsToNotes::VERSION = '0.001'; # TRIAL
6 # ABSTRACT: add fragments of HTML from plugins to file notes
7  
8 1 ▶use Method::Signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11  
12 1 ▶method transform_files {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine transform_files: called CC=4 SCAR=13.9
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ > 0 0 1 1
13 1 my %snippets;
14 1 for my $snippet ( $self->embra->plugins_with( '-Snippet' ) ) {
15 1 push @{ $snippets{ $snippet->clipboard } }, $snippet->fragment;
16 }
17 1 for ( @{ $self->embra->files } ) {
18 1 $_->update_notes( snippets => \%snippets );
19 }
20 }
21  
22 1 with 'App::Embra::Role::FileTransformer';
23  
24 1 1;
25  
26 __END__
« Embra/Plugin/PublishFiles.pm ↑ Summary Embra/Plugin/TemplateToolkit.pm »