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

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

revision 923 by dpavlin, Wed Oct 31 00:26:43 2007 UTC revision 982 by dpavlin, Sat Nov 3 13:35:03 2007 UTC
# Line 1  Line 1 
1  package WebPAC::Normalize;  package WebPAC::Normalize;
2  use Exporter 'import';  use Exporter 'import';
3  @EXPORT = qw/  our @EXPORT = qw/
4          _set_rec _set_lookup          _set_rec _set_lookup
5          _set_load_row          _set_load_row
6          _get_ds _clean_ds          _get_ds _clean_ds
# Line 15  use Exporter 'import'; Line 15  use Exporter 'import';
15          marc_original_order          marc_original_order
16    
17          rec1 rec2 rec          rec1 rec2 rec
18            frec
19          regex prefix suffix surround          regex prefix suffix surround
20          first lookup join_with          first lookup join_with
21          save_into_lookup          save_into_lookup
# Line 23  use Exporter 'import'; Line 24  use Exporter 'import';
24    
25          get set          get set
26          count          count
27    
28  /;  /;
29    
30  use warnings;  use warnings;
# Line 36  use Carp qw/confess/; Line 38  use Carp qw/confess/;
38  # debugging warn(s)  # debugging warn(s)
39  my $debug = 0;  my $debug = 0;
40    
41    use WebPAC::Normalize::ISBN;
42    push @EXPORT, ( 'isbn_10', 'isbn_13' );
43    
44  =head1 NAME  =head1 NAME
45    
# Line 75  Return data structure Line 79  Return data structure
79          marc_encoding => 'utf-8',          marc_encoding => 'utf-8',
80          config => $config,          config => $config,
81          load_row_coderef => sub {          load_row_coderef => sub {
82                  my ($database,$input,$mfn) = shift;                  my ($database,$input,$mfn) = @_;
83                  $store->load_row( database => $database, input => $input, id => $mfn );                  $store->load_row( database => $database, input => $input, id => $mfn );
84          },          },
85    );    );
# Line 168  my ($out, $marc_record, $marc_encoding, Line 172  my ($out, $marc_record, $marc_encoding,
172  my ($marc_record_offset, $marc_fetch_offset) = (0, 0);  my ($marc_record_offset, $marc_fetch_offset) = (0, 0);
173    
174  sub _get_ds {  sub _get_ds {
175    #warn "## out = ",dump($out);
176          return $out;          return $out;
177  }  }
178    
# Line 994  return scalar, not array. Line 999  return scalar, not array.
999    
1000  =cut  =cut
1001    
1002    sub frec {
1003            my @out = rec(@_);
1004            warn "rec(",dump(@_),") has more than one return value, ignoring\n" if $#out > 0;
1005            return shift @out;
1006    }
1007    
1008  sub rec {  sub rec {
1009          my @out;          my @out;
1010          if ($#_ == 0) {          if ($#_ == 0) {

Legend:
Removed from v.923  
changed lines
  Added in v.982

  ViewVC Help
Powered by ViewVC 1.1.26