die with message if no field name is specified
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 23 Nov 2003 15:39:23 +0000 (15:39 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 23 Nov 2003 15:39:23 +0000 (15:39 +0000)
git-svn-id: file:///home/dpavlin/private/svn/webpac/trunk@169 13eb9ef6-21d5-0310-b721-a9d68796d827

marc_sf.pm

index 2061b66..d21a508 100644 (file)
@@ -4,8 +4,8 @@
 # e.g. marc_sf($row,'700','a')
 #
 sub marc_sf {
-       my $marc = shift @_;
-       my $f = shift @_;
+       my $marc = shift @_ || die "marc_sf: needs record";
+       my $f = shift @_ || die "marc_sf: needs field name";
        my $s = shift @_;
 
        my $i = shift @_ || 0;