/usr/share/perl5/Catmandu/Exporter/MARC.pm is in libcatmandu-marc-perl 0.214-1.
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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | =head1 NAME
Catmandu::Exporter::MARC - Exporter for MARC records
=head1 SYNOPSIS
# From the command line
$ catmandu convert MARC --type USMARC to MARC --type XML < /foo/bar.mrc
# From Perl
use Catmandu;
my $importer = Catmandu->importer('MARC', file => "/foo/bar.mrc" , type => 'USMARC');
my $exporter = Catmandu->exporter('MARC', file => "marc.xml", type => "XML" );
$exporter->add($importer);
$exporter->commit;
=head1 METHODS
=head2 new(file => $file, type => $type)
Create a new L<Catmandu::Exporter> which serializes MARC records into a $file.
Type describes the MARC serializer to be used. Currently we support:
=over 2
=item USMARC L<Catmandu::Exporter::MARC::USMARC>
=item XML L<Catmandu::Exporter::MARC::XML>
=item MARCMaker L<Catmandu::Exporter::MARC::MARCMaker>
=item MiJ L<Catmandu::Exporter::MARC::MiJ>
=item ALEPHSEQ L<Catmandu::Exporter::MARC::ALEPHSEQ>
=back
Read the documentation of the parser modules for extra configuration options.
=head1 SEE ALSO
L<Catmandu::Exporter>
=cut
package Catmandu::Exporter::MARC;
use Catmandu::Sane;
use Moo;
has type => (is => 'ro' , default => sub { 'XML' });
has _exporter => (is => 'ro' , lazy => 1 , builder => '_build_exporter' , handles => 'Catmandu::Exporter');
has _exporter_args => (is => 'rwp', writer => '_set_exporter_args');
sub _build_exporter {
my ($self) = @_;
my $type = $self->type;
my $pkg = Catmandu::Util::require_package($type,'Catmandu::Exporter::MARC');
$pkg->new($self->_exporter_args);
}
sub BUILD {
my ($self,$args) = @_;
$self->_set_exporter_args($args);
}
1;
|