blib/lib/PERLANCAR/ShellQuote/Any.pm

filter: Statementstmt 100% 11 / 11 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod 100% 1 / 1 totaltotal 100% 16 / 16 CC 2 SCAR 5.1
CC
2
Cov
100%
shell_quote
2.0
import
1.0
CRAP 1.7
↑ Summary
1 package PERLANCAR::ShellQuote::Any;
2  
3 2 our $DATE = '2016-09-27'; # DATE
4 2 our $VERSION = '0.002'; # VERSION
5  
6 # Be lean.
7 #use 5.010001;
8 #use strict 'subs', 'vars';
9 #use warnings;
10  
11 1 ▶sub import {
Subroutine import: called CC=1 SCAR=0.0
12 1 my $caller = caller;
13  
14 1 *{"$caller\::shell_quote"} = \&shell_quote;
15 }
16  
17 2 ▶sub shell_quote {
Subroutine shell_quote: called CC=2 SCAR=6.9
Pod documented
18 2 ▶ if ($^O eq 'MSWin32') {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O eq 'MSWin32') { } 1 1 2
19 1 require Win32::ShellQuote;
20 1 Win32::ShellQuote::quote_system_string(@_);
21 } else {
22 1 require String::ShellQuote;
23 1 String::ShellQuote::shell_quote(@_);
24 }
25 }
26  
27 2 1;
28 # ABSTRACT: Escape strings for the shell on Unix or MSWin32
29  
30 __END__
↑ Summary