| 1 | package Text::APL; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 2 | our $VERSION = 0.08; | |||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 2 | ▶ | use Text::APL::Core; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 2 | ▶ | use Text::APL::WithCaching; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | sub new { | ||||||||||||||||||||
| 12 | 20 | ▶ | my $class = shift; | ||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=14.2
Pod
documented
| |||||||||||||||||||||
| 13 | 20 | my (%options) = @_; | |||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 20 | ▶ | $options{charset} ||= 'UTF-8'; | ||||||||||||||||||
|
Condition50%1/2
$options{"charset"} ||= "UTF-8"
MC/DC0%0/1
$options{"charset"} ||= "UTF-8"
$options{"charset"}
Truth table50%1/2
A
A= $options{"charset"}
| |||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 20 | ▶ | $options{reader} ||= $class->_build_reader(charset => $options{charset}); | ||||||||||||||||||
|
Condition33%1/3
$options{"reader"} ||= $class->_build_reader("charset", $options{"charset"})
MC/DC0%0/2
$options{"reader"} ||= $class->_build_reader("charset", $options{"charset"})
$options{"reader"}
$class->_build_reader("charset", $options{"charset"})
Truth table33%1/3
A ||= B
A= $options{"reader"}B= $class->_build_reader("charset", $options{"charset"})
| |||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | 20 | ▶ | if (delete $options{cache}) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 20 | 1 | return Text::APL::WithCaching->new(%options); | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 19 | return Text::APL::Core->new(%options); | |||||||||||||||||||
| 24 | } | ||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | sub _build_reader { | ||||||||||||||||||||
| 27 | 20 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
_build_reader: called CC=3 SCAR=16.7
| |||||||||||||||||||||
| 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(@_); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 34 | } | ||||||||||||||||||||
| 35 | : exists $INC{"IO/AIO.pm"} | ||||||||||||||||||||
| 36 | 20 | ▶ | ? do { require Text::APL::Reader::AIO; Text::APL::Reader->AIO->new(@_) } | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 37 | : Text::APL::Reader->new(@_); | ||||||||||||||||||||
| 38 | } | ||||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | 2 | 1; | |||||||||||||||||||
| 41 | __END__ | ||||||||||||||||||||