line | % | coverage | branch |
209 | 0 | T | F | if ($dbh) |
213 | 0 | T | F | if ($mode eq 'ods' or $mode eq 'excel') |
216 | 0 | T | F | $mode && $mode eq 'ods' ? : |
217 | 0 | T | F | if ($dom) |
219 | 0 | T | F | if ($mode and $mode eq 'ods') |
227 | 0 | T | F | if ($@) |
228 | 0 | T | F | if $debug |
233 | 0 | T | F | $mode eq 'csv' || $mode eq 'sql' ? : |
| 0 | T | F | $mode eq 'ods' ? : |
| 0 | T | F | if (_export_table('marc_tag_structure', $dbh, $mode eq 'csv' || $mode eq 'sql' ? $xmlStrRef : $dom, $mode eq 'ods' ? $elementSS : $root, $frameworkcode, $mode)) |
234 | 0 | T | F | $mode eq 'csv' || $mode eq 'sql' ? : |
| 0 | T | F | $mode eq 'ods' ? : |
| 0 | T | F | if (_export_table('marc_subfield_structure', $dbh, $mode eq 'csv' || $mode eq 'sql' ? $xmlStrRef : $dom, $mode eq 'ods' ? $elementSS : $root, $frameworkcode, $mode)) |
235 | 0 | T | F | if $mode eq 'ods' or $mode eq 'excel' |
250 | 0 | T | F | if ($mode eq 'csv') { } |
| 0 | T | F | elsif ($mode eq 'sql') { } |
| 0 | T | F | elsif ($mode eq 'ods') { } |
293 | 0 | T | F | if ($@) |
294 | 0 | T | F | if $debug |
340 | 0 | T | F | if ($@) |
341 | 0 | T | F | if $debug |
376 | 0 | T | F | $$hashRef{'Type'} =~ /int/i ? : |
388 | 0 | T | F | if ($$_{'type'} eq 'float' and not defined $data) { } |
| 0 | T | F | elsif ($$_{'type'} eq 'string' and (not $data and $data ne '0')) { } |
393 | 0 | T | F | if $$_{'type'} eq 'string' |
404 | 0 | T | F | if ($@) |
405 | 0 | T | F | if $debug |
441 | 0 | T | F | $$hashRef{'Type'} =~ /int/i ? : |
458 | 0 | T | F | if ($$_{'type'} eq 'Number' and not defined $data) { } |
| 0 | T | F | elsif ($$_{'type'} eq 'String' and (not $data and $data ne '0')) { } |
463 | 0 | T | F | $$_{'type'} eq 'String' ? : |
467 | 0 | T | F | if ($@) |
468 | 0 | T | F | if $debug |
496 | 0 | T | F | if ($ENV{'TMP'} and -d $ENV{'TMP'}) { } |
| 0 | T | F | elsif ($ENV{'TMPDIR'} and -d $ENV{'TMPDIR'}) { } |
| 0 | T | F | elsif ($ENV{'TEMP'} and -d $ENV{'TEMP'}) { } |
512 | 0 | T | F | -d $tmp ? : |
517 | 0 | T | F | if ($@) { } |
543 | 0 | T | F | -d $tmp ? : |
545 | 0 | T | F | if ($@) |
549 | 0 | T | F | if ($tempdir) |
552 | 0 | T | F | if (open OUT, "> $tempdir/content.xml") |
556 | 0 | T | F | if (open OUT, "> $tempdir/mimetype") |
560 | 0 | T | F | if (open OUT, "> $tempdir/meta.xml") |
564 | 0 | T | F | if (open OUT, "> $tempdir/styles.xml") |
568 | 0 | T | F | if (open OUT, "> $tempdir/settings.xml") |
582 | 0 | T | F | if (open OUT, "> $tempdir/META-INF/manifest.xml") |
587 | 0 | T | F | if ($@) { } |
588 | 0 | T | F | if $debug |
598 | 0 | T | F | if ($@) |
601 | 0 | T | F | if not $cmd or not -x $cmd |
606 | 0 | T | F | if (-f "$tempdir/new.ods") |
607 | 0 | T | F | if (open MYFILE, "$tempdir/new.ods") |
618 | 0 | T | F | if (not $tempModule and $tempdir) |
624 | 0 | T | F | if ($@) |
628 | 0 | T | F | if $ok |
676 | 0 | T | F | if (-r $filename and $dbh) { } |
678 | 0 | T | F | if ($filename =~ /\.(csv|ods|xml|sql)$/i) { } |
681 | 0 | T | F | if $deleteFilename |
684 | 0 | T | F | if ($extension eq 'ods') |
687 | 0 | T | F | if ($filename) |
690 | 0 | T | F | if ($extension eq 'ods' or $extension eq 'xml') { } |
694 | 0 | T | F | if ($dom) |
701 | 0 | T | F | if ($dom) { } |
703 | 0 | T | F | if ($extension eq 'sql') { } |
710 | 0 | T | F | if (($numDeletedAux = _import_table($dbh, 'marc_tag_structure', $frameworkcode, $dom, ['frameworkcode', 'tagfield'], $extension)) >= 0) |
711 | 0 | T | F | if $numDeletedAux > 0 |
712 | 0 | T | F | if (($numDeletedAux = _import_table($dbh, 'marc_subfield_structure', $frameworkcode, $dom, ['frameworkcode', 'tagfield', 'tagsubfield'], $extension)) >= 0) |
713 | 0 | T | F | if $numDeletedAux > 0 |
714 | 0 | T | F | $numDeleted > 0 ? : |
719 | 0 | T | F | if $debug |
722 | 0 | T | F | if ($@) { } |
723 | 0 | T | F | if $debug |
725 | 0 | T | F | if ($extension eq 'sql' or $extension eq 'csv') |
726 | 0 | T | F | if $dom |
730 | 0 | T | F | if $deleteFilename |
732 | 0 | T | F | if $debug |
734 | 0 | T | F | if ($deleteFilename and $tempdir and -d $tempdir and -w $tempdir) |
740 | 0 | T | F | if ($@) |
761 | 0 | T | F | 'C4::Context'->config('db_scheme') eq 'mysql' ? : |
768 | 0 | T | F | unless $line =~ /^\s*(?i:DELETE\s+FROM|INSERT\s+INTO)\s+(?:marc_tag_structure|marc_subfield_structure)/ |
771 | 0 | T | F | unless ($line =~ /'$frameworkcode'/) |
773 | 0 | T | F | if ($parser) { } |
775 | 0 | T | F | if $line =~ /;$/ |
778 | 0 | T | F | if ($where and $where->op eq '=' and $line =~ /^\s*DELETE/) { } |
779 | 0 | T | F | unless $_ =~ /frameworkcode='$frameworkcode'/ |
785 | 0 | T | F | if ($parser->VERSION < 1.3) { } |
797 | 0 | T | F | if (scalar @arrFields == scalar @arrValues) |
801 | 0 | T | F | if ($_ eq 'frameworkcode' and $arrValues[$j] ne $frameworkcode) { } |
809 | 0 | T | F | if $modified |
813 | 0 | T | F | if $@ |
817 | 0 | T | F | if ($error) |
818 | 0 | T | F | unless $line =~ /;$/ |
819 | 0 | T | F | if ($line =~ /^\s*DELETE/) { } |
| 0 | T | F | elsif ($line =~ /^\s*INSERT\s+INTO\s+(.*?)\s+\((.*?frameworkcode.*?)\)\s+VALUES\s+\((.+)\)\s*;\s*$/) { } |
820 | 0 | T | F | unless $_ =~ /frameworkcode='$frameworkcode'/ |
827 | 0 | T | F | if ($values) |
830 | 0 | T | F | if (scalar @arrFields == scalar @arrValues) |
833 | 0 | T | F | if ($arrFields[$i] eq 'frameworkcode' and $arrValues[$i]{'value'} ne $frameworkcode) { } |
| 0 | T | F | elsif ($arrValues[$i]{'literal'}) { } |
840 | 0 | T | F | if ($modified) |
864 | 0 | T | F | if $currentChar =~ /^\s$/ |
865 | 0 | T | F | if $posBegin and not $currentChar =~ /^[,']$/ |
866 | 0 | T | F | if (not $posBegin) { } |
867 | 0 | T | F | if ($currentChar eq q[']) { } |
874 | 0 | T | F | if ($currentChar eq ',') { } |
| 0 | T | F | elsif ($currentChar eq q['] and $posLiteral) { } |
875 | 0 | T | F | unless ($posLiteral) |
880 | 0 | T | F | if $literalEscape eq '\\' and substr($values, $currentPos - 2, 1) eq $literalEscape |
881 | 0 | T | F | if ($literalEscape eq q['] and substr($values, $currentPos, 1) eq $literalEscape) |
886 | 0 | T | F | if substr($values, $currentPos, 1) eq ',' |
892 | 0 | T | F | $posLiteral ? : |
| 0 | T | F | if $posBegin |
907 | 0 | T | F | -d $tmp ? : |
909 | 0 | T | F | if ($@) |
913 | 0 | T | F | if ($tempdir) |
919 | 0 | T | F | if $file->isDirectory |
921 | 0 | T | F | unless $extractName eq 'content.xml' |
925 | 0 | T | F | if ($@) |
928 | 0 | T | F | if not $cmd or not -x $cmd |
931 | 0 | T | F | if (-f "$tempdir/content.xml") |
932 | 0 | T | F | if $deleteFilename |
936 | 0 | T | F | if $deleteFilename |
962 | 0 | T | F | if ($fieldsA) { } |
970 | 0 | T | F | unless (exists $$fields{$_}) |
1004 | 0 | T | F | if ($format eq 'csv') { } |
| 0 | T | F | elsif ($format eq 'ods') { } |
1020 | 0 | T | F | if ($ok) { } |
1021 | 0 | T | F | if (($ok = scalar keys %fields2Delete) > 0) |
1046 | 0 | T | F | if ($db_scheme eq 'mysql') { } |
1053 | 0 | T | F | if ($db_scheme eq 'mysql') { } |
1059 | 0 | T | F | if ($@) { } |
1060 | 0 | T | F | unless ($db_scheme eq 'mysql') |
1070 | 0 | T | F | unless $@ |
1072 | 0 | T | F | if $debug |
1076 | 0 | T | F | if ($ok) |
1080 | 0 | T | F | if exists $$fields2Delete{$field} |
1102 | 0 | T | F | if ($nodeR->nodeType == 1 and $format && $format eq 'ods' && $nodeR->nodeName =~ /(?:table:)?table-row/ || $nodeR->nodeName =~ /(?:ss:)?Row/ and $nodeR->hasChildNodes) |
1103 | 0 | T | F | if ($j == 0) { } |
1106 | 0 | T | F | unless _check_validity_worksheet($dbh, $table, $nodeR, \@fields, $format) |
1110 | 0 | T | F | if $dataStr |
1113 | 0 | T | F | if $updateStr |
1117 | 0 | T | F | if (scalar @fields == scalar @$dataFieldsR) |
1151 | 0 | T | F | if ($row =~ /,"[^"]*[\r\n]+$/ or $row =~ /^[^"]+[\r\n]+$/) |
1156 | 0 | T | F | if ($partialRow) |
1161 | 0 | T | F | if ($row =~ /(?:".*?",?)+/) |
1163 | 0 | T | F | if $arrData[0] =~ /^"/ |
1165 | 0 | T | F | if $arrData[$#arrData] =~ /"$/ |
1166 | 0 | T | F | if (@arrData) |
1167 | 0 | T | F | if ($arrData[0] eq '#-#' and $arrData[$#arrData] eq '#-#') { } |
| 0 | T | F | elsif ($fieldsNameRead and $arrData[0] eq 'tagfield') { } |
1175 | 0 | T | F | if (scalar @$fields == scalar @arrData) |
1176 | 0 | T | F | if (not $fieldsNameRead) { } |
1180 | 0 | T | F | if ($arrData[$i] ne $$fields[$i]) |
1185 | 0 | T | F | if ($fieldsNameRead) |
1189 | 0 | T | F | if $dataStr |
1192 | 0 | T | F | if $updateStr |
1199 | 0 | T | F | if ($$fields[$j] eq 'frameworkcode' and $_ ne $frameworkcode) { } |
1231 | 0 | T | F | if (@nodes == 1 and $nodes[0]->hasChildNodes) { } |
1235 | 0 | T | F | if $debug |
1252 | 0 | T | F | if (@nodes > 0) { } |
1255 | 0 | T | F | if (@nodesT == 1 and $nodesT[0]->hasChildNodes) |
1261 | 0 | T | F | if $debug |
1274 | 0 | T | F | if ($node->nodeType == 1 and $node->nodeName =~ /(?:table:)?table-cell/) |
1275 | 0 | T | F | if ($node->hasAttributeNS('urn:oasis:names:tc:opendocument:xmlns:office:1.0', 'value')) { } |
| 0 | T | F | elsif ($node->hasChildNodes) { } |
1279 | 0 | T | F | if (@nodes2 == 1 and $nodes2[0]->hasChildNodes) |
1283 | 0 | T | F | if ($node->hasAttributeNS('urn:oasis:names:tc:opendocument:xmlns:table:1.0', 'number-columns-repeated')) |
1298 | 0 | T | F | if ($node and $node->hasChildNodes) |
1305 | 0 | T | F | if ($format and $format eq 'ods') { } |
1306 | 0 | T | F | if $repeated <= 0 |
1308 | 0 | T | F | if defined $data |
1310 | 0 | T | F | if ($node2->nodeType == 1 and $node2->nodeName =~ /(?:ss:)?Cell/) |
1312 | 0 | T | F | if (@nodes3 == 1 and $nodes3[0]->hasChildNodes) |
1318 | 0 | T | F | if ($ok) |
1319 | 0 | T | F | if $data eq '#' |
1320 | 0 | T | F | if $$fields[$i] eq 'frameworkcode' |
1326 | 0 | T | F | if $repeated <= 0 |
1338 | 0 | T | F | if ($node and $node->hasChildNodes) |
1342 | 0 | T | F | if ($format and $format eq 'ods') { } |
1344 | 0 | T | F | if defined $data |
1346 | 0 | T | F | if ($node2->nodeType == 1 and $node2->nodeName =~ /(?:ss:)?Cell/) |
1348 | 0 | T | F | if (@nodes3 == 1 and $nodes3[0]->hasChildNodes) |