--- trunk2/lib/WebPAC.pm 2004/06/20 15:49:09 373 +++ trunk2/lib/WebPAC.pm 2004/06/20 16:57:52 374 @@ -188,6 +188,8 @@ push @{$self->{'data'}->{$mfn}->{$k}}, $val; } + } else { + push @{$self->{'data'}->{$mfn}->{'000'}}, $mfn; } } @@ -602,6 +604,9 @@ my @ds = $webpac->data_structure($rec); +This method will also set C<$webpac->{'currnet_filename'}> if there is + tag in C. + =cut sub data_structure { @@ -612,6 +617,8 @@ my $rec = shift; $log->logconfess("need HASH as first argument!") if ($rec !~ /HASH/o); + undef $self->{'currnet_filename'}; + my @sorted_tags; if ($self->{tags_by_order}) { @sorted_tags = @{$self->{tags_by_order}}; @@ -651,11 +658,17 @@ push @{$row->{'swish'}}, @v; } + if ($field eq 'filename') { + $self->{'current_filename'} = join('',@v); + $log->debug("filename: ",$self->{'current_filename'}); + } + } if ($row) { $row->{'tag'} = $field; push @ds, $row; + $log->debug("row $field: ",sub { Dumper($row) }); } @@ -749,8 +762,8 @@ sub _get_logger { my $self = shift; - my @c = caller(1); - return get_logger($c[3]); + my $name = (caller(1))[3] || caller; + return get_logger($name); } #