This file is indexed.

/usr/share/perl5/Catmandu/Importer/MARC/MARCMaker.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
=head1 NAME

Catmandu::Importer::MARC::MARCMaker - Package that imports MARCMaker records

=head1 SYNOPSIS

    # From the command line 
    $ catmandu convert MARC --type MARCMaker --fix "marc_map('245a','title')" < /foo/data.mrk

    # From perl
    use Catmandu;

    # import records from file
    my $importer = Catmandu->importer('MARC',file => '/foo/data.mrk', type => 'MARCMaker');
    my $fixer    = Catmandu->fixer("marc_map('245a','title')");

    $importer->each(sub {
        my $item = shift;
        ...
    });

    # or using the fixer

    $fixer->fix($importer)->each(sub {
        my $item = shift;
        printf "title: %s\n" , $item->{title};
    });

=head1 METHODS

=head2 new(file => $file , fh => $fh , id => $field)

Parse a file or a filehandle into a L<Catmandu::Iterable>. Optionally provide an
id attribute specifying the source of the system identifer '_id' field (e.g. '001').

=head1 INHERTED METHODS

=head2 count

=head2 each(&callback)

=head2 ...

Every Catmandu::Importer is a Catmandu::Iterable all its methods are inherited. 

=head1 SEE ALSO

L<MARC::File::MARCMaker>

=cut
package Catmandu::Importer::MARC::MARCMaker;
use Catmandu::Sane;
use Moo;
use MARC::File::MARCMaker;

extends 'Catmandu::Importer::MARC::Record';

sub generator {
    my ($self) = @_;
    my $file = MARC::File::MARCMaker->in($self->fh);
    sub  {
      $self->decode_marc($file->next());
    }
}

1;