/[MARC-Fast]/trunk/lib/MARC/Fast.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/MARC/Fast.pm

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

revision 23 by dpavlin, Sun Nov 4 22:44:42 2007 UTC revision 26 by dpavlin, Mon Nov 19 16:37:00 2007 UTC
# Line 2  package MARC::Fast; Line 2  package MARC::Fast;
2    
3  use strict;  use strict;
4  use Carp;  use Carp;
5  use Data::Dumper;  use Data::Dump qw/dump/;
6    
7  BEGIN {  BEGIN {
8          use Exporter ();          use Exporter ();
# Line 124  sub new { Line 124  sub new {
124    
125                  # skip to next record                  # skip to next record
126                  my $o = substr($leader,0,5);                  my $o = substr($leader,0,5);
127                    warn "# in record ", $self->{count}," record length isn't number but: ",dump($o),"\n" unless $o =~ m/^\d+$/;
128                  if ($o > 24) {                  if ($o > 24) {
129                          seek($self->{fh},$o-24,1) if ($o);                          seek($self->{fh},$o-24,1) if ($o);
130                  } else {                  } else {
# Line 336  sub to_hash { Line 337  sub to_hash {
337    
338                                          # repeatable subfiled -- convert it to array                                          # repeatable subfiled -- convert it to array
339                                          if ($val->{$f}) {                                          if ($val->{$f}) {
340                                                  if ( $sf_usage->{$f} == 2 ) {                                                  if ( ref($val->{$f}) ne 'ARRAY' ) {
341                                                          $val->{$f} = [ $val->{$f}, $val ];                                                          $val->{$f} = [ $val->{$f}, $val ];
342                                                  } else {                                                  } else {
343                                                          push @{$val->{$f}}, $val;                                                          push @{$val->{$f}}, $val;

Legend:
Removed from v.23  
changed lines
  Added in v.26

  ViewVC Help
Powered by ViewVC 1.1.26