line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PERLANCAR::ShellQuote::Any; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $DATE = '2016-09-26'; # DATE |
4
|
|
|
|
|
|
|
our $VERSION = '0.001'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# Be lean. |
7
|
|
|
|
|
|
|
#use 5.010001; |
8
|
|
|
|
|
|
|
#use strict 'subs', 'vars'; |
9
|
|
|
|
|
|
|
#use warnings; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub import { |
12
|
1
|
|
|
1
|
|
6
|
my $caller = caller; |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
|
|
1
|
*{"$caller\::shell_quote"} = \&shell_quote; |
|
1
|
|
|
|
|
987
|
|
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub shell_quote { |
18
|
2
|
100
|
|
2
|
1
|
428
|
if ($^O eq 'MSWin32') { |
19
|
1
|
|
|
|
|
442
|
require Win32::ShellQuote; |
20
|
1
|
|
|
|
|
1010
|
Win32::ShellQuote::quote_system_string(@_); |
21
|
|
|
|
|
|
|
} else { |
22
|
1
|
|
|
|
|
403
|
require String::ShellQuote; |
23
|
1
|
|
|
|
|
551
|
String::ShellQuote::shell_quote(@_); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
# ABSTRACT: Escape strings for the shell on Unix or MSWin32 |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |