line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::Boolean::English; |
2
|
|
|
|
|
|
|
# ABSTRACT: DEPRECATED - provides English rules to Lingua::Boolean |
3
|
6
|
|
|
6
|
|
12688
|
use strict; |
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
270
|
|
4
|
6
|
|
|
6
|
|
37
|
use warnings; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
196
|
|
5
|
6
|
|
|
6
|
|
5972
|
use utf8; |
|
6
|
|
|
|
|
57
|
|
|
6
|
|
|
|
|
37
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.008'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
85
|
|
|
85
|
1
|
150
|
my $class = shift; |
12
|
|
|
|
|
|
|
|
13
|
85
|
|
|
|
|
147
|
my $LANG = 'en'; |
14
|
85
|
|
|
|
|
121
|
my $LANGUAGE = 'English'; |
15
|
|
|
|
|
|
|
|
16
|
85
|
|
|
|
|
119
|
my $match; |
17
|
85
|
|
|
|
|
945
|
$match->{True} = [qr{^y(?:es)?$}i, qr{^on$}i, qr{^ok$}i, qr{^true$}i, qr{^[1-9]$}]; |
18
|
85
|
|
|
|
|
728
|
$match->{False} = [qr{^no?$}i, qr{^off$}i, qr{not ?ok$}i, qr{^false$}i, qr{^0$}]; |
19
|
|
|
|
|
|
|
|
20
|
85
|
|
|
|
|
367
|
my $self = { |
21
|
|
|
|
|
|
|
LANG => $LANG, |
22
|
|
|
|
|
|
|
LANGUAGE => $LANGUAGE, |
23
|
|
|
|
|
|
|
match => $match, |
24
|
|
|
|
|
|
|
}; |
25
|
85
|
|
|
|
|
237
|
bless $self, $class; |
26
|
85
|
|
|
|
|
247
|
return $self; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |