| 1 | package Data::TableReader::Decoder::XLS; | ||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use Moo 2; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use Carp; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 1 | extends 'Data::TableReader::Decoder::Spreadsheet'; | |||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 1 | our @xls_probe_modules= ( [ 'Spreadsheet::ParseExcel', '0.66' ] ); | |||||||||||||||||||||||||||
| 7 | 1 | our $default_xls_module; | |||||||||||||||||||||||||||
| 8 | 2 | ▶ | sub default_xls_module { | ||||||||||||||||||||||||||
|
Subroutine
default_xls_module: called CC=2 SCAR=7.2
Pod
documented
| |||||||||||||||||||||||||||||
| 9 | 2 | ▶ | $default_xls_module ||= | ||||||||||||||||||||||||||
|
Condition66%2/3
$Data::TableReader::Decoder::XLS::default_xls_module ||= Data::TableReader::Decoder::_first_sufficient_module("XLS parser", \@Data::TableReader::Decoder::XLS::xls_probe_modules)
MC/DC0%0/2
$Data::TableReader::Decoder::XLS::default_xls_module ||= Data::TableReader::Decoder::_first_sufficient_module("XLS parser", \@Data::TableReader::Decoder::XLS::xls_probe_modules)
$Data::TableReader::Decoder::XLS::default_xls_module
Data::TableReader::Decoder::_first_sufficient_module("XLS parser", \@Data::TableReader::Decoder::XLS::xls_probe_modules)
Truth table66%2/3
A ||= B
A= $Data::TableReader::Decoder::XLS::default_xls_moduleB= Data::TableReader::Decoder::_first_sufficient_module("XLS parser", \@Data::TableReader::Decoder::XLS::xls_probe_modules)
| |||||||||||||||||||||||||||||
| 10 | Data::TableReader::Decoder::_first_sufficient_module('XLS parser', \@xls_probe_modules); | ||||||||||||||||||||||||||||
| 11 | } | ||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | # ABSTRACT: Access sheets/rows of a Microsoft Excel '97 workbook | ||||||||||||||||||||||||||||
| 14 | 1 | our $VERSION = '0.023'; # VERSION | |||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 1 | ▶ | sub _build_workbook { | ||||||||||||||||||||||||||
|
Subroutine
_build_workbook: called CC=4 SCAR=15.2
| |||||||||||||||||||||||||||||
| 18 | 1 | my $self= shift; | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 1 | my $wbook; | |||||||||||||||||||||||||||
| 21 | 1 | my $f= $self->file_handle; | |||||||||||||||||||||||||||
| 22 | 1 | ▶ | if (ref $f and ref($f)->can('worksheets')) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
ref $f and ref($f)->can("worksheets")
MC/DC0%0/2
ref $f and ref($f)->can("worksheets")
ref $f
ref($f)->can("worksheets")
Truth table33%1/3
A and B
A= ref $fB= ref($f)->can("worksheets")
| |||||||||||||||||||||||||||||
| 23 | 0 | $wbook= $f; | |||||||||||||||||||||||||||
| 24 | } else { | ||||||||||||||||||||||||||||
| 25 | 1 | $wbook= $self->default_xls_module->new->parse($f, $self->xls_formatter); | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | 1 | ▶ | defined $wbook or croak "Can't parse file '".$self->file_name."'"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 28 | 1 | return $wbook; | |||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | 1 | 1; | |||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | __END__ | ||||||||||||||||||||||||||||