/[webpac]/trunk/marc_sf.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/marc_sf.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 215 - (show annotations)
Sun Feb 1 22:06:00 2004 UTC (15 years, 7 months ago) by dpavlin
File size: 442 byte(s)
brown-bag bug: I was using MARC.pm wrong: now whole file will be loaded
at start of indexing, changing memory usage to much more step-like, but
that enables real progress indicator and few seconds gain in indexing
speed.

1 #
2 # marc_sf($marc,'field'[,'subfield'])
3 #
4 # e.g. marc_sf($row,'700','a')
5 #
6 sub marc_sf {
7 my $marc = shift @_ || die "marc_sf: needs record";
8 my $f = shift @_ || die "marc_sf: needs field name";
9 my $s = shift @_;
10
11 my $i = shift @_ || 0;
12
13 my $rec = $main::cache->{marc_record} || die '$cache->{marc_record} is undefined!';
14
15 my @out = $marc->getvalue({record=>$rec,field=>$f,subfield=>$s});
16
17 return $out[$i] if (@out && $out[$i]);
18 }
19
20 1;
21

Properties

Name Value
cvs2svn:cvs-rev 1.6

  ViewVC Help
Powered by ViewVC 1.1.26