Skip to content
Snippets Groups Projects
Commit 128f3a21 authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

- replaced write_file() call

parent 5ba14cf8
Branches
Tags
No related merge requests found
......@@ -151,7 +151,7 @@ sub get_mods_from ($$) { # $mods = ($url, $ppn)
my $parser = XML::LibXML->new();
if ($with_debug) {
say "write DEBUG_${ppn}_response.xml";
write_file("DEBUG_${ppn}_response.xml", {binmode => ':utf8'}, $record->decoded_content);
write_file("DEBUG_${ppn}_response.xml", $record->decoded_content);
}
my $marcblob = $parser->parse_string(
$xp->findnodes_as_string('/*[local-name()="searchRetrieveResponse"]/*[local-name()="records"]/*[local-name()="record"]/*[local-name()="recordData"]/*')
......@@ -159,9 +159,9 @@ sub get_mods_from ($$) { # $mods = ($url, $ppn)
my $marcblob_patched = patch_marc_response( $marcblob );
if ($with_debug) {
say "write DEBUG_${ppn}_marc_unpatched.xml";
write_file("DEBUG_${ppn}_marc_unpatched.xml", {binmode => ':utf8'}, $marcblob);
write_file("DEBUG_${ppn}_marc_unpatched.xml", $marcblob);
say "write DEBUG_${ppn}_marc.xml";
write_file("DEBUG_${ppn}_marc.xml", {binmode => ':utf8'}, $marcblob_patched);
write_file("DEBUG_${ppn}_marc.xml", $marcblob_patched);
}
my $xslt = XML::LibXSLT->new();
my $marcmods = XML::LibXML->load_xml(location=>$marc_mods_url, no_cdata=>1);
......@@ -170,7 +170,7 @@ sub get_mods_from ($$) { # $mods = ($url, $ppn)
my $result = $stylesheet->transform( $marc);
if ($with_debug) {
say "write DEBUG_${ppn}_unpatched_mods.xml";
write_file("DEBUG_${ppn}_unpatched_mods.xml", {binmode => ':utf8'}, $stylesheet->output_string( $result ));
write_file("DEBUG_${ppn}_unpatched_mods.xml", $stylesheet->output_string( $result ));
}
$result = patch_mods( $result);
my $result_string = $stylesheet->output_string( $result );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment