MARC records, and inheritance

2004-03-14 Thread Enrico Silterra
Beginning to use perl to parse MARC records, and
thinking about the different types of MARC records.
I think that having various derived classes of MARC records.

Holding, Bib Records, Name Authority, etc would be useful.

I am not quite sure of a good way of reading in the records and
returning the correct type.
My initial thought is to over-ride the next method on file, to
examine the record, and return a record of the correct derived type,
instead of MARC.
Thanks a lot for your thoughts.
Rick Silterra


**
Enrico Silterra
Meta Data Engineer
107-E Olin Library
Cornell University
Ithaca NY 14853
Voice: 607-255-6851
Fax: 607-255-6110
E-mail: [EMAIL PROTECTED]
http://www.library.cornell.edu/cts/
**  



Re: MARC records, and inheritance

2004-03-14 Thread Ed Summers
Hi Enrico:

On Sun, Mar 14, 2004 at 02:47:26PM -0500, Enrico Silterra wrote:
 I think that having various derived classes of MARC records.
 Holding, Bib Records, Name Authority, etc would be useful.

Interesting question. MARC::Record should handle holdings, authority,
classification, and community records just fine since they are all 
structurally the same. 

The type of record could be determined by looking at position 6 in the leader.
But I'm wondering why you think having MARC::Record::Bibliographic
MARC::Record::Authority (etc) would be useful. MARC::Records generic
methods already work fine for all these types of MARC records.

Enabling MARC::Lint (which does deal with the semantics of the tags) 
to understand authority, classification, community records would be cool.
In fact it's on the shortlist of things to do if you are interested [1].

//Ed

[1] http://rt.cpan.org/NoAuth/Bug.html?id=4813