/[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 750 by dpavlin, Sun Oct 8 13:24:46 2006 UTC revision 766 by dpavlin, Tue Oct 31 13:19:47 2006 UTC
# Line 1022  Easy as pie, right? Line 1022  Easy as pie, right?
1022  sub lookup {  sub lookup {
1023          my ($what, $database, $input, $key, $having) = @_;          my ($what, $database, $input, $key, $having) = @_;
1024    
1025          confess "lookup needs 5 arguments: what, database, input, key, having" unless ($#_ == 4);          confess "lookup needs 5 arguments: what, database, input, key, having\n" unless ($#_ == 4);
1026    
1027          warn "## lookup ($database, $input, $key)", $/ if ($debug > 1);          warn "## lookup ($database, $input, $key)", $/ if ($debug > 1);
1028          return unless (defined($lookup->{$database}->{$input}->{$key}));          return unless (defined($lookup->{$database}->{$input}->{$key}));
# Line 1036  sub lookup { Line 1036  sub lookup {
1036    
1037          foreach my $h ( @having ) {          foreach my $h ( @having ) {
1038                  if (defined($lookup->{$database}->{$input}->{$key}->{$h})) {                  if (defined($lookup->{$database}->{$input}->{$key}->{$h})) {
1039                          warn "lookup for $database/$input/$key/$h return ",dump($lookup->{$database}->{$input}->{$key}->{$h}),"\n";                          warn "lookup for $database/$input/$key/$h return ",dump($lookup->{$database}->{$input}->{$key}->{$h}),"\n" if ($debug);
1040                          $mfns->{$_}++ foreach keys %{ $lookup->{$database}->{$input}->{$key}->{$h} };                          $mfns->{$_}++ foreach keys %{ $lookup->{$database}->{$input}->{$key}->{$h} };
1041                  }                  }
1042          }          }
# Line 1053  sub lookup { Line 1053  sub lookup {
1053          foreach my $mfn (@mfns) {          foreach my $mfn (@mfns) {
1054                  $rec = $load_row_coderef->( $database, $input, $mfn );                  $rec = $load_row_coderef->( $database, $input, $mfn );
1055    
1056                  warn "got $database/$input/$mfn = ", dump($rec), $/;                  warn "got $database/$input/$mfn = ", dump($rec), $/ if ($debug);
1057    
1058                  my @vals = $what->();                  my @vals = $what->();
1059    
1060                  push @out, ( @vals );                  push @out, ( @vals );
1061    
1062                  warn "lookup for mfn $mfn returned ", dump(@vals), $/;                  warn "lookup for mfn $mfn returned ", dump(@vals), $/ if ($debug);
1063          }          }
1064    
1065  #       if (ref($lookup->{$k}) eq 'ARRAY') {  #       if (ref($lookup->{$k}) eq 'ARRAY') {

Legend:
Removed from v.750  
changed lines
  Added in v.766

  ViewVC Help
Powered by ViewVC 1.1.26