/[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

trunk/Fast.pm revision 33 by dpavlin, Thu Feb 4 17:13:18 2010 UTC trunk/lib/MARC/Fast.pm revision 39 by dpavlin, Thu Sep 23 12:55:35 2010 UTC
# Line 7  use Data::Dump qw/dump/; Line 7  use Data::Dump qw/dump/;
7  BEGIN {  BEGIN {
8          use Exporter ();          use Exporter ();
9          use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);          use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
10          $VERSION     = 0.09;          $VERSION     = 0.10;
11          @ISA         = qw (Exporter);          @ISA         = qw (Exporter);
12          #Give a hoot don't pollute, do not export more than needed by default          #Give a hoot don't pollute, do not export more than needed by default
13          @EXPORT      = qw ();          @EXPORT      = qw ();
# Line 311  sub to_hash { Line 311  sub to_hash {
311    
312          my $row = $self->fetch($mfn) || return;          my $row = $self->fetch($mfn) || return;
313    
314          foreach my $rec_nr (keys %{$row}) {          foreach my $tag (keys %{$row}) {
315                  foreach my $l (@{$row->{$rec_nr}}) {                  foreach my $l (@{$row->{$tag}}) {
316    
317                          # remove end marker                          # remove end marker
318                          $l =~ s/\x1E$//;                          $l =~ s/\x1E$//;
319    
320                          # filter output                          # filter output
321                          $l = $self->{'hash_filter'}->($l, $rec_nr) if ($self->{'hash_filter'});                          $l = $self->{'hash_filter'}->($l, $tag) if ($self->{'hash_filter'});
322    
323                          my $val;                          my $val;
324    
# Line 351  sub to_hash { Line 351  sub to_hash {
351                                  $val = $l;                                  $val = $l;
352                          }                          }
353    
354                          push @{$rec->{$rec_nr}}, $val;                          push @{$rec->{$tag}}, $val;
355                  }                  }
356          }          }
357    

Legend:
Removed from v.33  
changed lines
  Added in v.39

  ViewVC Help
Powered by ViewVC 1.1.26