/usr/share/perl5/Catmandu/Fix/marc_xml.pm is in libcatmandu-marc-perl 0.206-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | package Catmandu::Fix::marc_xml;
use Catmandu::Sane;
use Moo;
use IO::String;
use Catmandu::Exporter::MARC::XML;
use Catmandu::Util qw(:is :data);
use Catmandu::Fix::Has;
has path => (fix_arg => 1);
# Transform a raw MARC array into MARCXML
sub fix {
my ($self, $data) = @_;
my $path = $self->path;
my $xml;
my $exporter = Catmandu::Exporter::MARC::XML->new(file => \$xml , xml_declaration => 0 , collection => 0);
$exporter->add($data);
$exporter->commit;
$data->{$path} = $xml;
$data;
}
=head1 NAME
Catmandu::Fix::marc_xml - transform a Catmandu MARC record into MARCXML
=head1 SYNOPSIS
# Transforms the 'record' key into an MARCXML string
marc_xml('record')
=head1 DESCRIPTION
Read our Wiki pages at L<https://github.com/LibreCat/Catmandu/wiki/Fixes> for a complete
overview of the Fix language.
=head1 SEE ALSO
L<Catmandu::Fix>
=cut
1;
|