summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-07-04 20:15:37 -0400
committerJesse Luehrs <doy@tozt.net>2014-07-04 20:15:37 -0400
commita73ee64e3aa33f8669c79bd2c22089d8c5b3196d (patch)
tree0b42c7e4f86cc5afcdfe49c87c7b13f469759f58
parentf77dcd0d44f0a3a0325cff7d180d98135dac8b6b (diff)
downloadspreadsheet-parsexlsx-a73ee64e3aa33f8669c79bd2c22089d8c5b3196d.tar.gz
spreadsheet-parsexlsx-a73ee64e3aa33f8669c79bd2c22089d8c5b3196d.zip
stop using eval here
-rw-r--r--lib/Spreadsheet/ParseXLSX.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm
index 45c7250..72c8793 100644
--- a/lib/Spreadsheet/ParseXLSX.pm
+++ b/lib/Spreadsheet/ParseXLSX.pm
@@ -634,11 +634,9 @@ sub _extract_files {
$self->_rels_for($wb_name)
);
- my $strings_xml = eval {
- $zip->memberNamed( $path_base
- .( $wb_rels->find_nodes(qq<//Relationship[\@Type="$type_base/sharedStrings"]>) )[0]->att('Target')
- )->contents;
- };
+ my ($strings_xml) = map {
+ $zip->memberNamed($path_base . $_->att('Target'))->contents
+ } $wb_rels->find_nodes(qq<//Relationship[\@Type="$type_base/sharedStrings"]>);
my $styles_xml = $self->_parse_xml(
$zip,