| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Acme::CPANModules::Parse::UnixShellCommandLine; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
257033
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
35
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
169
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
|
7
|
|
|
|
|
|
|
our $DATE = '2023-10-31'; # DATE |
|
8
|
|
|
|
|
|
|
our $DIST = 'Acme-CPANModules-Parse-UnixShellCommandLine'; # DIST |
|
9
|
|
|
|
|
|
|
our $VERSION = '0.003'; # VERSION |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $LIST = { |
|
12
|
|
|
|
|
|
|
summary => "List of modules that parse command-line like Unix shells", |
|
13
|
|
|
|
|
|
|
description => <<'_', |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Sometimes you need to parse a Unix shell command-line string, e.g. when you want |
|
16
|
|
|
|
|
|
|
to break it into "words". |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
In general I recommend as it is a core module. If you want |
|
19
|
|
|
|
|
|
|
a little more speed, try (see reference to |
|
20
|
|
|
|
|
|
|
benchmark in See Also). |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
_ |
|
23
|
|
|
|
|
|
|
entries => [ |
|
24
|
|
|
|
|
|
|
{ |
|
25
|
|
|
|
|
|
|
module=>'Complete::Bash', |
|
26
|
|
|
|
|
|
|
description => <<'_', |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Its `parse_cmdline()` function can break a command-line string into words. This |
|
29
|
|
|
|
|
|
|
function is geared for tab completion, so by default it also breaks on some |
|
30
|
|
|
|
|
|
|
other word-breaking characters like "=", "@", and so on. Probably not what you |
|
31
|
|
|
|
|
|
|
want generally, unless you are working with tab completion. |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
_ |
|
34
|
|
|
|
|
|
|
}, |
|
35
|
|
|
|
|
|
|
{ |
|
36
|
|
|
|
|
|
|
module=>'Complete::Zsh', |
|
37
|
|
|
|
|
|
|
}, |
|
38
|
|
|
|
|
|
|
{ |
|
39
|
|
|
|
|
|
|
module=>'Complete::Fish', |
|
40
|
|
|
|
|
|
|
}, |
|
41
|
|
|
|
|
|
|
{ |
|
42
|
|
|
|
|
|
|
module=>'Complete::Tcsh', |
|
43
|
|
|
|
|
|
|
}, |
|
44
|
|
|
|
|
|
|
{ |
|
45
|
|
|
|
|
|
|
module=>'Text::ParseWords', |
|
46
|
|
|
|
|
|
|
description => <<'_', |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
This core module can split string into words with customizable quoting character |
|
49
|
|
|
|
|
|
|
and support for escaping using backslash. Its `shellwords()` function is |
|
50
|
|
|
|
|
|
|
suitable for breaking command-line string into words. |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
_ |
|
53
|
|
|
|
|
|
|
}, |
|
54
|
|
|
|
|
|
|
{ |
|
55
|
|
|
|
|
|
|
module=>'Parse::CommandLine', |
|
56
|
|
|
|
|
|
|
}, |
|
57
|
|
|
|
|
|
|
{ |
|
58
|
|
|
|
|
|
|
module=>'Parse::CommandLine::Regexp', |
|
59
|
|
|
|
|
|
|
}, |
|
60
|
|
|
|
|
|
|
], |
|
61
|
|
|
|
|
|
|
}; |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |
|
64
|
|
|
|
|
|
|
# ABSTRACT: List of modules that parse command-line like Unix shells |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
__END__ |