output missing year in biblio
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 23 Jan 2014 11:00:05 +0000 (12:00 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 23 Jan 2014 11:00:05 +0000 (12:00 +0100)
html.pl

diff --git a/html.pl b/html.pl
index 32fa173..51d8623 100755 (executable)
--- a/html.pl
+++ b/html.pl
@@ -218,10 +218,12 @@ while( my $row = $sth_select_authors->fetchrow_hashref ) {
                                }
                        }
                        push @{ $data->{$tag} }, $sf_data if $sf_data;
-        }
-    }
+               }
+       }
 
-       if ( $data->{year} < 2008 ) {
+       if ( ! defined $data->{year} ) {
+               warn "MISSING year in ", $row->{biblionumber};
+       } elsif ( $data->{year} < 2008 ) {
                push @{ $skip->{year_lt_2008} }, $row->{biblionumber};
                next;
        } elsif ( $data->{year} > 2013 ) {