| 1 | package Data::XLSX::Parser::DocumentArchive; | ||||||||||
| 2 | 9 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 9 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 9 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 9 | ▶ | use Archive::Zip; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 9 | 0 | my ($class, $filename) = @_; | |||||||||
| 10 | |||||||||||
| 11 | 0 | my $zip = Archive::Zip->new; | |||||||||
| 12 | 0 | ▶ | if ($zip->read($filename) != Archive::Zip::AZ_OK) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | 0 | confess "couldn't open file: $filename $!"; | |||||||||
| 14 | } | ||||||||||
| 15 | |||||||||||
| 16 | bless { | ||||||||||
| 17 | 0 | _zip => $zip, | |||||||||
| 18 | }, $class; | ||||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 0 | ▶ | sub workbook { | ||||||||
|
Subroutine
workbook: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 22 | 0 | my ($self) = @_; | |||||||||
| 23 | 0 | $self->{_zip}->memberNamed('xl/workbook.xml'); | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | sub sheet { | ||||||||
|
Subroutine
sheet: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 27 | 0 | my ($self, $path) = @_; | |||||||||
| 28 | # only add xl/ if not already there, as some tools add absolute paths in relations | ||||||||||
| 29 | 0 | ▶ | $path = sprintf ('xl/%s', $path) unless $path =~ /^xl\//; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 0 | $self->{_zip}->memberNamed($path); | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 0 | ▶ | sub shared_strings { | ||||||||
|
Subroutine
shared_strings: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 34 | 0 | my ($self) = @_; | |||||||||
| 35 | 0 | $self->{_zip}->memberNamed('xl/sharedStrings.xml'); | |||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | 0 | ▶ | sub styles { | ||||||||
|
Subroutine
styles: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 39 | 0 | my ($self) = @_; | |||||||||
| 40 | 0 | $self->{_zip}->memberNamed('xl/styles.xml'); | |||||||||
| 41 | } | ||||||||||
| 42 | |||||||||||
| 43 | 0 | ▶ | sub relationships { | ||||||||
|
Subroutine
relationships: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 44 | 0 | my ($self) = @_; | |||||||||
| 45 | 0 | $self->{_zip}->memberNamed('xl/_rels/workbook.xml.rels'); | |||||||||
| 46 | } | ||||||||||
| 47 | |||||||||||
| 48 | 9 | 1; | |||||||||
| 49 | __END__ | ||||||||||