
MARC::Descriptions - MARC metadata looker-upper

use MARC::Descriptions
my $TD = MARC::Descriptions->new;
# hash of all tag data
my $href = $TD->get("245");
# string description
my $s = $TD->get("245", "description");
# hash of all subfields
my $href = $TD->get("245", "subfield");
# hash of subfield 'a'
my $href = $TD->get("245", "subfield", "a");
# description of subfield 'a'
my $s = $TD->get("245", "subfield", "a", "description");

MARC::Description allows you to get either a string of information about a particular bit of a MARC record (eg: the description of the 245 tag, or the flags associated with tag 245 subfield \$a), or a hash of (hashes of) strings of information about a particular subset of a MARC record (eg: all of the 2nd indicators for tag 245, or all of the subfields for tag 245, or even a complete breakdown of tag 245).

Creates the MARC::Descriptions object. You only ever need one of these; all of the fun stuff is done in get().

Returns information about the MARC structure.
tag is the MARC tag
eg: get("010")
With no other parameters, this returns a hash of all information
about that tag.
parm1 can be one of:
"description","shortname", or "flags" (eg: get("245","description")),
in which case a string is returned with that information,
or
"ind1","ind2","subfield" (eg: get("245","subfield")),
in which case parm2 will be the indicator/subfield that you're
interested in, and get() will return a hash of the information
about all possible indicators or subfields.
If both parm1 and parm2 are specified, then parm3 can also be specified
to have get() return a string containing information about that particular
indicator/subfield. (eg: get("245","subfield","a"))

If you've asked get() to return a hash, it will look like this (or a subset of this) - the example is for get("010"):
{
flags => "",
shortname => "LCCN",
description => "Library of Congress Control Number",
ind1 => {
"#" => {
flags => "",
description => "Unused",
},
},
ind2 => {
"#" => {
flags => "",
description => "Blank",
},
},
subfield => {
"a" => {
flags => "",
description => "LC control number",
},
"b" => {
flags => "aR",
description => "National Union Catalog of Manuscript Collections Control Number",
},
"z" => {
flags => "R",
description => "Canceled/invalid LC control number",
},
},
}

A mailing list devoted to the use of Perl in libraries.
The definitive source for all things MARC.
Online version of the free booklet. An excellent overview of the MARC format. Essential.
Follett Software Company's (http://www.fsc.follett.com/) monthly discussion of various MARC tags.
The Library Corporation's (L:<http://www.carl.org/tlccarl/index.asp>) free online resource for cataloguers.

David Christensen, <DChristensenSPAMLESS@westman.wave.ca>

Copyright 2003 by David Christensen
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.