Runner/Quote.pm

filter: Statementstmt 87.5% 21 / 24 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 0.0% 0 / 2 totaltotal 77.7% 28 / 36 CC 1 SCAR 2.2
CC
1
Cov
85%
quote_win32
2.0
quote_unix
2.0
BEGIN
1.0
CRAP 1.2
« Runner/Timeout.pm ↑ Summary
1 package Command::Runner::Quote;
2 10 ▶use v5.24;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 10 ▶use experimental qw(lexical_subs signatures);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 10 ▶use Win32::ShellQuote ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7 10 ▶use String::ShellQuote ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 10 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 10 our @EXPORT_OK = qw(quote quote_win32 quote_unix);
11  
12 0 ▶sub quote_win32 ($str) {
Subroutine quote_win32: not called CC=1 SCAR=6.9
Pod undocumented
13 0 Win32::ShellQuote::quote_literal($str, 1);
14 }
15  
16 0 ▶sub quote_unix ($str) {
Subroutine quote_unix: not called CC=1 SCAR=6.9
Pod undocumented
17 0 String::ShellQuote::shell_quote_best_effort($str);
18 }
19  
20 10 ▶if ($^O eq 'MSWin32') {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O eq 'MSWin32') { } 0 10 10
21 0 *quote = \&quote_win32;
22 } else {
23 10 *quote = \&quote_unix;
24 }
25  
26 10 1;
« Runner/Timeout.pm ↑ Summary