line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Getopt::Long::Negate::EN; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $DATE = '2016-01-03'; # DATE |
4
|
|
|
|
|
|
|
our $VERSION = '0.03'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
1416
|
use 5.010001; |
|
1
|
|
|
|
|
7
|
|
7
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
33
|
|
8
|
1
|
|
|
1
|
|
8
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
7
|
use Exporter qw(import); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
876
|
|
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw(negations_for_option); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub negations_for_option { |
14
|
15
|
|
|
15
|
1
|
51
|
my $word = shift; |
15
|
|
|
|
|
|
|
|
16
|
15
|
100
|
|
|
|
165
|
if ($word =~ /\Awith([_-].+)/ ) { return ("without$1") } |
|
1
|
100
|
|
|
|
8
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
17
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Awithout([_-].+)/) { return ("with$1") } |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
7
|
elsif ($word =~ /\Ais([_-].+)/ ) { return ("isnt$1") } |
20
|
1
|
|
|
|
|
7
|
elsif ($word =~ /\Aisnt([_-].+)/ ) { return ("is$1") } |
21
|
1
|
|
|
|
|
10
|
elsif ($word =~ /\Aare([_-].+)/ ) { return ("arent$1") } |
22
|
1
|
|
|
|
|
7
|
elsif ($word =~ /\Aarent([_-].+)/ ) { return ("are$1") } |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Ahas([_-].+)/ ) { return ("hasnt$1") } |
25
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Ahave([_-].+)/ ) { return ("havent$1") } |
26
|
1
|
|
|
|
|
7
|
elsif ($word =~ /\Ahasnt([_-].+)/ ) { return ("has$1") } |
27
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Ahavent([_-].+)/ ) { return ("have$1") } |
28
|
|
|
|
|
|
|
|
29
|
1
|
|
|
|
|
7
|
elsif ($word =~ /\Acan([_-].+)/ ) { return ("cant$1") } |
30
|
1
|
|
|
|
|
8
|
elsif ($word =~ /\Acant([_-].+)/ ) { return ("can$1") } |
31
|
|
|
|
|
|
|
|
32
|
2
|
|
|
|
|
13
|
elsif ($word =~ /\Ano[_-](.+)/ ) { return ($1) } |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
else { |
35
|
|
|
|
|
|
|
# default from Getopt::Long |
36
|
1
|
|
|
|
|
11
|
return ("no-$word", "no$word"); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
# ABSTRACT: Better negation of boolean option names |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |