Cinnamon/Local.pm

filter: Statementstmt 66.6% 16 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 67.7% 21 / 31 CC 4 SCAR 22.5
CC
4
Cov
67%
execute
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 9.4
« Cinnamon/CLI.pm ↑ Summary Cinnamon/HandleManager.pm »
1 package Cinnamon::Local;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 ▶use IPC::Run ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶use Cinnamon::Logger;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 0 ▶sub execute {
Subroutine execute: not called CC=4 SCAR=30.0
Pod undocumented
12 0 my ($self, $commands, $opts) = @_;
13 0 my $result = IPC::Run::run $commands, \my $stdin, \my $stdout, \my $stderr;
14 0 chomp for ($stdout, $stderr);
15  
16 0 for my $line (split "\n", $stdout) {
17 0 log info => sprintf "[localhost :: stdout] %s",
18 $line;
19 }
20 0 for my $line (split "\n", $stderr) {
21 0 log info => sprintf "[localhost :: stderr] %s",
22 $line;
23 }
24  
25 +{
26 0 stdout => $stdout,
27 stderr => $stderr,
28 has_error => $? > 0,
29 error => $?,
30 };
31 }
32  
33 2 !!1;
« Cinnamon/CLI.pm ↑ Summary Cinnamon/HandleManager.pm »