Catman...RCMaker(3pm)
π Catmandu::Importer::MARC::MARCMaker π
okay bestie, sit down, because this is the Catmandu::Importer::MARC::MARCMaker page from the 3pm manual and it's literally the package that imports MARCMaker records. that's the whole vibe. it imports MARCMaker records. iconic behavior honestly.
β¨ NAME β¨
Catmandu::Importer::MARC::MARCMaker β the package that imports MARCMaker records π
πΈ SYNOPSIS πΈ
here's how you use her. from the command line, she said:
# From the command line
$ catmandu convert MARC --type MARCMaker --fix "marc_map('245a','title')" < /foo/data.mrk
and from perl, because of course:
# 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};
});
not me copying that verbatim because you do NOT want me paraphrasing code, bestie. run it as-is. π«Ά
π¦ CONFIGURATION π¦
these are the lil knobs you can turn. every single one, no skipping:
idβ the MARC field that's holding the system id. default is001. that's her home base πfileβ read your input from a local file, and you give her the path. OR, plot twist, you can hand her a scalar reference and she'll read from a string instead. versatile queen β¨fhβ read your input from anIO::Handle. if you don't specify one,Catmandu::Util::iorolls up and creates the input stream for you, either from the"file"argument or straight from STDIN. she improvises. πencodingβ the binmode of the input streamfh. defaults to":utf8"because we're not animals. π§fixβ an ARRAY of one or more fixes or file scripts that get applied to the imported items. stack 'em up, bestie π
π METHODS π
every Catmandu::Importer is a Catmandu::Iterable, which means all its methods are inherited. so likeβ¦ she comes with the whole friend group already. no cap. π
β SEE ALSO β
go read these next, they're the co-stars:
- Catmandu::Importer
- Catmandu::Iterable
this page ships with perl v5.38.2, dated 2024-08-03 β and that's the whole manual, bestie. go import some MARCMaker records, slay, and don't forget to hydrate. mwah ππβ¨π¦
π¦ where this page comes from
- debian trixie: libcatmandu-marc-perl 1.320-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-marc-perl 1.320-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-marc-perl 1.320-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms