dump items without marc instead of dieing
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 9 Jul 2009 22:01:11 +0000 (22:01 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 9 Jul 2009 22:01:11 +0000 (22:01 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1232 07558da8-63fa-0310-ba24-9fe276d99e06

lib/WebPAC/Input/Koha.pm

index 194fd3e..8192607 100644 (file)
@@ -7,6 +7,7 @@ use DBI;
 use MARC::Fast;
 use base qw/WebPAC::Common/;
 use Carp qw/confess/;
+use Data::Dump qw/dump/;
 
 =head1 NAME
 
@@ -65,8 +66,11 @@ sub fetch_rec {
        my $row = $self->{_sth}->fetchrow_hashref;
 
        if ( my $fh = $self->{_koha_fh} ) {
-               my $marc = $row->{marc} || die "no marc?";
-               print $fh $marc;
+               if ( my $marc = $row->{marc} ) {
+                       print $fh $marc;
+               } else {
+                       warn "MFN $mfn no marc in ",dump($row);
+               }
        }
 
        push @{$row->{'000'}}, $mfn;