Hello, MARC::Record::leader() doesn't have the same function as update_leader().
leader() seems to be a setter/getter method, but to set you need to know what you're setting to beforehand. update_leader() used to be really handy when you read in a MARC::Record from somewhere, changed or added a few fields. Then to update the leader to reflect those changes you only had to call $record->update_leader() and not have to do any tedious and possibly incorrect calculations yourself to set the leader using $record->leader($text). I'm currently using a colleague's calculations (from the UKMARC manual): my $reclen = length($marc->as_usmarc())+24; my $baseaddr = 24+(scalar($marc->fields())*12)+1; $marc->set_leader_lengths(sprintf("%05d", $reclen), sprintf("%05d", $baseaddr)); but thought that update_leader() ought (and used) to do this for you (indeed we're not 100% sure our calculations are right, but they seem to work!). Any more clues? Ben On Wed, 19 November, 2003 16:42, Ed Summers wrote: > On Wed, Nov 19, 2003 at 04:22:41PM +0000, Ben Soares wrote: > > I see there's an update_leader() method in MARC::File::USMARC, but I > > can't work out how you're supposed to use it. At first glance at the > > code, it looks like update_leader() and _build_tag_directory() have > > fallen out of MARC::Record and ended up in MARC::File::USMARC by > > accident? > > See MARC::Record::leader(). > > //Ed -- Ben Soares tel: +44 (0)131-651 1238 EDINA, Edinburgh University Data Library fax: +44 (0)131-650 3308 Main Library Building, George Square email: [EMAIL PROTECTED] Edinburgh EH8 9LJ, Scotland, UK www: http://edina.ac.uk/ "Hmmm, that makes no sense to me... But then you are very small, perhaps you're right." -- Treebeard