line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::APL; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
31135
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
73
|
|
4
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
72
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.07; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
694
|
use Text::APL::Core; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
58
|
|
9
|
2
|
|
|
2
|
|
675
|
use Text::APL::WithCaching; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
352
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
18
|
|
|
18
|
1
|
41
|
my $class = shift; |
13
|
18
|
|
|
|
|
26
|
my (%options) = @_; |
14
|
|
|
|
|
|
|
|
15
|
18
|
|
50
|
|
|
79
|
$options{charset} ||= 'UTF-8'; |
16
|
|
|
|
|
|
|
|
17
|
18
|
|
33
|
|
|
54
|
$options{reader} ||= $class->_build_reader(charset => $options{charset}); |
18
|
|
|
|
|
|
|
|
19
|
18
|
100
|
|
|
|
44
|
if (delete $options{cache}) { |
20
|
1
|
|
|
|
|
9
|
return Text::APL::WithCaching->new(%options); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
17
|
|
|
|
|
62
|
return Text::APL::Core->new(%options); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub _build_reader { |
27
|
18
|
|
|
18
|
|
17
|
my $self = shift; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
exists $INC{"AnyEvent.pm"} |
30
|
|
|
|
|
|
|
? do { |
31
|
0
|
|
|
|
|
|
require AnyEvent::AIO; |
32
|
0
|
|
|
|
|
|
require Text::APL::Reader::AIO; |
33
|
0
|
|
|
|
|
|
Text::APL::Reader::AIO->new(@_); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
: exists $INC{"IO/AIO.pm"} |
36
|
18
|
50
|
|
|
|
135
|
? do { require Text::APL::Reader::AIO; Text::APL::Reader->AIO->new(@_) } |
|
0
|
50
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
: Text::APL::Reader->new(@_); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
__END__ |