/[webpac2]/trunk/lib/WebPAC/Input/MARC.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

Diff of /trunk/lib/WebPAC/Input/MARC.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 908 by dpavlin, Mon Oct 29 23:20:13 2007 UTC revision 1110 by dpavlin, Sat Sep 6 10:53:47 2008 UTC
# Line 3  package WebPAC::Input::MARC; Line 3  package WebPAC::Input::MARC;
3  use warnings;  use warnings;
4  use strict;  use strict;
5    
6  use MARC::Fast 0.03;  use MARC::Fast;
7  use base qw/WebPAC::Common/;  use base qw/WebPAC::Common/;
8  use Carp qw/confess/;  use Carp qw/confess/;
9    
# Line 71  Return record with ID C<$mfn> from datab Line 71  Return record with ID C<$mfn> from datab
71    
72    my $rec = $self->fetch_rec( $mfn );    my $rec = $self->fetch_rec( $mfn );
73    
 }  
   
74  =cut  =cut
75    
76  sub fetch_rec {  sub fetch_rec {
# Line 84  sub fetch_rec { Line 82  sub fetch_rec {
82                  $self->_get_logger()->warn("seek beyond database size $self->{_marc_size} to $mfn");                  $self->_get_logger()->warn("seek beyond database size $self->{_marc_size} to $mfn");
83          } else {          } else {
84                  my $marc = $self->{_marc_db} || confess "no _marc_db?";                  my $marc = $self->{_marc_db} || confess "no _marc_db?";
85                  my $row = $marc->to_hash($mfn);                  my $row = $marc->to_hash($mfn, include_subfields => 1);
86                  push @{$row->{'000'}}, $mfn;                  push @{$row->{'000'}}, $mfn;
87                  push @{$row->{'leader'}}, $marc->last_leader;                  push @{$row->{'leader'}}, $marc->last_leader;
88                  return $row;                  return $row;
# Line 97  Return ASCII dump of record with ID C<$m Line 95  Return ASCII dump of record with ID C<$m
95    
96    print $self->dump_ascii( $mfn );    print $self->dump_ascii( $mfn );
97    
 }  
   
98  =cut  =cut
99    
100  sub dump_ascii {  sub dump_ascii {

Legend:
Removed from v.908  
changed lines
  Added in v.1110

  ViewVC Help
Powered by ViewVC 1.1.26