line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::APL; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
132049
|
use strict; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
59
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
82
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.09; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
815
|
use Text::APL::Core; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
54
|
|
9
|
2
|
|
|
2
|
|
749
|
use Text::APL::WithCaching; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
453
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
20
|
|
|
20
|
1
|
210
|
my $class = shift; |
13
|
20
|
|
|
|
|
41
|
my (%options) = @_; |
14
|
|
|
|
|
|
|
|
15
|
20
|
|
50
|
|
|
110
|
$options{charset} ||= 'UTF-8'; |
16
|
|
|
|
|
|
|
|
17
|
20
|
|
33
|
|
|
77
|
$options{reader} ||= $class->_build_reader(charset => $options{charset}); |
18
|
|
|
|
|
|
|
|
19
|
20
|
100
|
|
|
|
47
|
if (delete $options{cache}) { |
20
|
1
|
|
|
|
|
12
|
return Text::APL::WithCaching->new(%options); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
19
|
|
|
|
|
71
|
return Text::APL::Core->new(%options); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub _build_reader { |
27
|
20
|
|
|
20
|
|
30
|
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
|
20
|
50
|
|
|
|
112
|
? 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__ |