1MARC::File::MicroLIF(3)User Contributed Perl DocumentatioMnARC::File::MicroLIF(3)
2
3
4

NAME

6       MARC::File::MicroLIF - MicroLIF-specific file handling
7

SYNOPSIS

9           use MARC::File::MicroLIF;
10
11           my $file = MARC::File::MicroLIF->in( $filename );
12
13           while ( my $marc = $file->next() ) {
14               # Do something
15           }
16           $file->close();
17           undef $file;
18

EXPORT

20       None.
21
22       The buffer must be large enough to handle any valid record because we
23       don't check for cases like a CR/LF pair or an end-of-record/CR/LF trio
24       being only partially in the buffer.
25
26       The max valid record is the max MARC record size (99999) plus one or
27       two characters per tag (CR, LF, or CR/LF).  It's hard to say what the
28       max number of tags is, so here we use 6000.  (6000 tags can be squeezed
29       into a MARC record only if every tag has only one subfield containing a
30       maximum of one character, or if data from multiple tags overlaps in the
31       MARC record body.  We're pretty safe.)
32

METHODS

34       in()
35
36       Opens a MicroLIF file for reading.
37
38       Gets the next chunk of data.  If $want_line is true then you get the
39       next chunk ending with any combination of \r and \n of any length.  If
40       it is false or not passed then you get the next chunk ending with \x60
41       followed by any combination of \r and \n of any length.
42
43       All trailing \r and \n are stripped.
44
45       header()
46
47       If the MicroLIF file has a file header then the header is returned.  If
48       the file has no header or the file has not yet been opened then "undef"
49       is returned.
50
51       decode()
52
53       Decodes a MicroLIF record and returns a USMARC record.
54
55       Can be called in one of three different ways:
56
57           $object->decode( $lif )
58           MARC::File::MicroLIF->decode( $lif )
59           MARC::File::MicroLIF::decode( $lif )
60

TODO

63       MARC::File
64

LICENSE

66       This code may be distributed under the same terms as Perl itself.
67
68       Please note that these modules are not products of or supported by the
69       employers of the various contributors to the code.
70

AUTHOR

72       Andy Lester, "<andy@petdance.com>"
73
74
75
76perl v5.8.8                       2005-04-27           MARC::File::MicroLIF(3)
Impressum