line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Getopt::Long::Negate::EN; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $DATE = '2019-04-23'; # DATE |
4
|
|
|
|
|
|
|
our $VERSION = '0.060'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
559
|
use 5.010001; |
|
1
|
|
|
|
|
9
|
|
7
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
8
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
48
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
7
|
use Exporter qw(import); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
751
|
|
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw(negations_for_option); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub negations_for_option { |
14
|
23
|
|
|
23
|
1
|
143
|
my $word = shift; |
15
|
|
|
|
|
|
|
|
16
|
23
|
100
|
|
|
|
276
|
if ($word =~ /\Awith([_-].+)/ ) { return ("without$1") } |
|
1
|
100
|
|
|
|
9
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
17
|
1
|
|
|
|
|
10
|
elsif ($word =~ /\Awithout([_-].+)/) { return ("with$1") } |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Ais([_-].+)/ ) { return ("isnt$1") } |
20
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Aisnt([_-].+)/ ) { return ("is$1") } |
21
|
1
|
|
|
|
|
9
|
elsif ($word =~ /\Aare([_-].+)/ ) { return ("arent$1") } |
22
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Aarent([_-].+)/ ) { return ("are$1") } |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Ahas([_-].+)/ ) { return ("hasnt$1") } |
25
|
1
|
|
|
|
|
7
|
elsif ($word =~ /\Ahave([_-].+)/ ) { return ("havent$1") } |
26
|
1
|
|
|
|
|
7
|
elsif ($word =~ /\Ahasnt([_-].+)/ ) { return ("has$1") } |
27
|
1
|
|
|
|
|
9
|
elsif ($word =~ /\Ahavent([_-].+)/ ) { return ("have$1") } |
28
|
|
|
|
|
|
|
|
29
|
1
|
|
|
|
|
9
|
elsif ($word =~ /\Acan([_-].+)/ ) { return ("cant$1") } |
30
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Acant([_-].+)/ ) { return ("can$1") } |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Aenabled([_-].+)/ ) { return ("disabled$1") } |
33
|
1
|
|
|
|
|
20
|
elsif ($word =~ /\Adisabled([_-].+)/) { return ("enabled$1") } |
34
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Aenable([_-].+)/ ) { return ("disable$1") } |
35
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Adisable([_-].+)/) { return ("enable$1") } |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
12
|
elsif ($word =~ /\Aallowed([_-].+)/ ) { return ("disallowed$1") } |
38
|
1
|
|
|
|
|
7
|
elsif ($word =~ /\Adisallowed([_-].+)/) { return ("allowed$1") } |
39
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Aallow([_-].+)/ ) { return ("disallow$1") } |
40
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Adisallow([_-].+)/) { return ("allow$1") } |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
0
|
elsif ($word =~ /\Ainclude([_-].+)/ ) { return ("exclude$1") } |
43
|
0
|
|
|
|
|
0
|
elsif ($word =~ /\Aexclude([_-].+)/ ) { return ("include$1") } |
44
|
|
|
|
|
|
|
|
45
|
2
|
|
|
|
|
15
|
elsif ($word =~ /\Ano[_-](.+)/ ) { return ($1) } |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
else { |
48
|
|
|
|
|
|
|
# default from Getopt::Long |
49
|
1
|
|
|
|
|
9
|
return ("no-$word", "no$word"); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
# ABSTRACT: Better negation of boolean option names |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |