--- trunk2/lib/WebPAC.pm 2004/07/20 17:15:48 389 +++ trunk2/lib/WebPAC.pm 2004/07/24 13:48:08 398 @@ -656,7 +656,8 @@ my @ds = $webpac->data_structure($rec); This method will also set C<$webpac->{'currnet_filename'}> if there is - tag in C. + tag in C and C<$webpac->{'headline'}> if there is + tag. =cut @@ -669,6 +670,7 @@ $log->logconfess("need HASH as first argument!") if ($rec !~ /HASH/o); undef $self->{'currnet_filename'}; + undef $self->{'headline'}; my @sorted_tags; if ($self->{tags_by_order}) { @@ -706,6 +708,15 @@ @v = map { $self->apply_format($tag->{'format_name'},$tag->{'format_delimiter'},$_) } @v; } + if ($field eq 'filename') { + $self->{'current_filename'} = join('',@v); + $log->debug("filename: ",$self->{'current_filename'}); + } elsif ($field eq 'headline') { + $self->{'headline'} .= join('',@v); + $log->debug("headline: ",$self->{'headline'}); + next; # don't return headline in data_structure! + } + # does tag have type? if ($tag->{'type'}) { push @{$row->{$tag->{'type'}}}, @v; @@ -714,10 +725,6 @@ push @{$row->{'swish'}}, @v; } - if ($field eq 'filename') { - $self->{'current_filename'} = join('',@v); - $log->debug("filename: ",$self->{'current_filename'}); - } }