Parent Directory | Revision Log
die with message if no field name is specified
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 @out = $marc->getvalue({record=>$marc->marc_count(),field=>$f,subfield=>$s}); |
14 | |
15 | return $out[$i] if (@out && $out[$i]); |
16 | } |
17 | |
18 | 1; |
19 |
Name | Value |
---|---|
cvs2svn:cvs-rev | 1.5 |
ViewVC Help | |
Powered by ViewVC 1.1.26 |