/[webpac]/trunk2/lib/WebPAC.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 /trunk2/lib/WebPAC.pm

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

revision 373 by dpavlin, Sun Jun 20 15:49:09 2004 UTC revision 374 by dpavlin, Sun Jun 20 16:57:52 2004 UTC
# Line 188  sub open_isis { Line 188  sub open_isis {
188    
189                                          push @{$self->{'data'}->{$mfn}->{$k}}, $val;                                          push @{$self->{'data'}->{$mfn}->{$k}}, $val;
190                                  }                                  }
191                            } else {
192                                    push @{$self->{'data'}->{$mfn}->{'000'}}, $mfn;
193                          }                          }
194    
195                  }                  }
# Line 602  It is used later to produce output. Line 604  It is used later to produce output.
604    
605   my @ds = $webpac->data_structure($rec);   my @ds = $webpac->data_structure($rec);
606    
607    This method will also set C<$webpac->{'currnet_filename'}> if there is
608    <filename> tag in C<import_xml>.
609    
610  =cut  =cut
611    
612  sub data_structure {  sub data_structure {
# Line 612  sub data_structure { Line 617  sub data_structure {
617          my $rec = shift;          my $rec = shift;
618          $log->logconfess("need HASH as first argument!") if ($rec !~ /HASH/o);          $log->logconfess("need HASH as first argument!") if ($rec !~ /HASH/o);
619    
620            undef $self->{'currnet_filename'};
621    
622          my @sorted_tags;          my @sorted_tags;
623          if ($self->{tags_by_order}) {          if ($self->{tags_by_order}) {
624                  @sorted_tags = @{$self->{tags_by_order}};                  @sorted_tags = @{$self->{tags_by_order}};
# Line 651  sub data_structure { Line 658  sub data_structure {
658                                  push @{$row->{'swish'}}, @v;                                  push @{$row->{'swish'}}, @v;
659                          }                          }
660    
661                            if ($field eq 'filename') {
662                                    $self->{'current_filename'} = join('',@v);
663                                    $log->debug("filename: ",$self->{'current_filename'});
664                            }
665    
666                  }                  }
667    
668                  if ($row) {                  if ($row) {
669                          $row->{'tag'} = $field;                          $row->{'tag'} = $field;
670                          push @ds, $row;                          push @ds, $row;
671    
672                          $log->debug("row $field: ",sub { Dumper($row) });                          $log->debug("row $field: ",sub { Dumper($row) });
673                  }                  }
674    
# Line 749  sub _sort_by_order { Line 762  sub _sort_by_order {
762  sub _get_logger {  sub _get_logger {
763          my $self = shift;          my $self = shift;
764    
765          my @c = caller(1);          my $name = (caller(1))[3] || caller;
766          return get_logger($c[3]);          return get_logger($name);
767  }  }
768    
769  #  #

Legend:
Removed from v.373  
changed lines
  Added in v.374

  ViewVC Help
Powered by ViewVC 1.1.26