The docs are pointing to the method my $record = MARC::File::USMARC->decode( $marc_string) ;
which should work as well. The other use is probably "deprecated" but I don't think it's going away. (Doh, forgot that this email address is messed up with the listserv and it bounces the message. Well, at least you got the mail ;). Jon G. > -----Original Message----- > From: [email protected] [mailto:[email protected]] > Sent: Thursday, August 02, 2012 12:30 PM > To: Gorman, Jon > Cc: [email protected] > Subject: Re: RE: Turning string into MARC record > > Thanks for the speedy reply! I saw that in documentation but I didn't know > what a "marcblob" was (to me a blob is a database term). Also it says "for > compatibility with older versions of MARC::Record" so I was thinking using > that was deprecated anyway. > > Thanks again! > > Arvin > > > > On Aug 2, 2012, Gorman, Jon <[email protected]> wrote: > > No need to use MARC::Batch in this case, just use the > new_from_usmarc method in MARC::Record > > > my $record = MARC::Record->new_from_usmarc( $record_string ) ; > > Jon Gorman > University of Illinois > > > -----Original Message----- > > From: [email protected] [mailto:[email protected]] > > Sent: Thursday, August 02, 2012 12:17 PM > > To: [email protected] > > Subject: Turning string into MARC record > > > > This seems like such a stupid question - I've used MARC::Batch for > years - but > > how do you turn a MARC record string into a MARC::Record object? > > > > I've always started with a file of MARC records and cycle through > them with > > MARC::Batch. Now I have a single MARC record in a string - no file, > it's > > retrieved by Z39.50. I could have sworn I've done this before but I > can't find > > anything in the documentation. Do I have to somehow assign it to a > file > > handle à la "open (MARC, '<', \$rawmarc);" and pass that it in to > > MARC::Batch? I'm willing to do that but I really could swear there > was a > > simpler way to do it, avoiding MARC::Batch altogether. > > > > Arvin >
