/[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 1326 by dpavlin, Sat Sep 6 10:53:47 2008 UTC revision 1327 by dpavlin, Tue Feb 9 20:14:23 2010 UTC
# Line 37  Returns new low-level input API object Line 37  Returns new low-level input API object
37    
38    my $marc = new WebPAC::Input::MARC(    my $marc = new WebPAC::Input::MARC(
39          path => '/path/to/marc.iso',          path => '/path/to/marc.iso',
         filter => \&code_ref,  
40    }    }
41    
42  =cut  =cut
# Line 53  sub new { Line 52  sub new {
52    
53          $log->info("opening MARC database '$arg->{path}'");          $log->info("opening MARC database '$arg->{path}'");
54    
55            die "no filter support any more!" if $arg->{filter};
56    
57          my $db = new MARC::Fast(          my $db = new MARC::Fast(
58                  marcdb => $arg->{path},                  marcdb => $arg->{path},
59                  hash_filter => $arg->{filter},                  hash_filter => sub {
60                            my ( $l, $nr ) = @_;
61                            Encode::decode( 'utf-8', $l );
62                    },
63          );          );
64          my $db_size = $db->count - 1;   # FIXME          my $db_size = $db->count - 1;   # FIXME
65    

Legend:
Removed from v.1326  
changed lines
  Added in v.1327

  ViewVC Help
Powered by ViewVC 1.1.26