line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Search::Tools::TokenPP; |
2
|
2
|
|
|
2
|
|
9
|
use Moo; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
12
|
|
3
|
|
|
|
|
|
|
extends 'Search::Tools::Object'; |
4
|
2
|
|
|
2
|
|
487
|
use Carp; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
201
|
|
5
|
|
|
|
|
|
|
use overload |
6
|
252
|
|
|
252
|
|
1270
|
'""' => sub { $_[0]->str; }, |
7
|
207
|
|
|
207
|
|
1064
|
'bool' => sub { $_[0]->len; }, |
8
|
2
|
|
|
2
|
|
7
|
fallback => 1; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
24
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
124
|
use namespace::autoclean; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
16
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '1.004'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my @attrs |
15
|
|
|
|
|
|
|
= qw( is_match is_hot pos str len u8len is_sentence_start is_sentence_end ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
for my $attr (@attrs) { |
18
|
|
|
|
|
|
|
has $attr => ( is => 'rw' ); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
188
|
|
|
188
|
1
|
640
|
sub set_hot { $_[0]->is_hot( $_[1] ); } |
22
|
188
|
|
|
188
|
1
|
161599
|
sub set_match { $_[0]->is_match( $_[1] ); } |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |