MARC::...croLIF(3pm)
π NAME π
MARC::File::MicroLIF β the MicroLIF-flavored file handling girlie β¨ like, this is the module that knows how to read MicroLIF files specifically, bestie π
πΈ SYNOPSIS πΈ
Okay so here's the whole vibe in code:
use MARC::File::MicroLIF;
my $file = MARC::File::MicroLIF->in( $filename );
while ( my $marc = $file->next() ) {
# Do something
}
$file->close();
undef $file;
That's it, that's the whole flow π
π¦ EXPORT π¦
None. Nada. Nothing gets exported, no cap π
The buffer must be large enough to handle any valid record β because we do not check for cases like a CR/LF pair, or an end-of-record/CR/LF trio, being only partially in the buffer. So like, be generous with the buffer, okay? It's giving "trust me bro" energy but for real fr fr.
The max valid record is the max MARC record size (99999) plus one or two characters per tag (CR, LF, or CR/LF). It's genuinely hard to say what the max number of tags is, so here we use 6000. And like β 6000 tags can only get squeezed into a MARC record if every single tag has just one subfield containing a maximum of one character, or if data from multiple tags overlaps in the MARC record body. So basically we're pretty safe π
β METHODS β
π in()
Opens a MicroLIF file for reading.
It gets the next chunk of data. If $want_line is true then you get the next chunk ending with any combination of \r and \n of any length. If it's false or not passed at all, then you get the next chunk ending with \x60 followed by any combination of \r and \n of any length.
All trailing \r and \n get stripped π§
π header()
If the MicroLIF file has a file header, then the header is returned π If the file has no header β or the file hasn't been opened yet β then undef is returned. So like, undef is the "no thoughts, head empty" response here π
π decode()
Decodes a MicroLIF record and returns a USMARC record. Main character behavior, honestly π
Can be called in one of three different ways:
$object->decode( $lif )
MARC::File::MicroLIF->decode( $lif )
MARC::File::MicroLIF::decode( $lif )
Pick your fighter, they all eat π₯
π TODO π
(crickets) β nothing listed here, bestie π«Ά
π RELATED MODULES π
MARC::File
π LICENSE π
This code may be distributed under the same terms as Perl itself.
Please note that these modules are not products of or supported by the employers of the various contributors to the code. So like, your boss is not your tech support for this one π
β¨ AUTHOR β¨
Andy Lester, "<andy@petdance.com>" β iconic, we stan π
This wasMARC::...croLIF(3pm)from the User Contributed Perl Documentation, and the page was generated withperl v5.36.0on2022-10-13π thanks for reading bestie, go read some records πβ¨
π¦ where this page comes from
- ubuntu noble: libmarc-record-perl 2.0.7-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmarc-record-perl 2.0.7-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmarc-record-perl 2.0.7-3 Β· 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