30 |
=head1 SYNOPSIS |
=head1 SYNOPSIS |
31 |
|
|
32 |
This module uses C<conf/normalize/*.pl> files to perform normalisation |
This module uses C<conf/normalize/*.pl> files to perform normalisation |
33 |
from input records |
from input records using perl functions which are specialized for set |
34 |
|
processing. |
35 |
|
|
36 |
|
Sets are implemented as arrays, and normalisation file is valid perl, which |
37 |
|
means that you check it's validity before running WebPAC using |
38 |
|
C<perl -c normalize.pl>. |
39 |
|
|
40 |
|
Normalisation can generate multiple output normalized data. For now, supported output |
41 |
|
types (on the left side of definition) are: C<tag>, C<display> and C<search>. |
42 |
|
|
43 |
=head1 FUNCTIONS |
=head1 FUNCTIONS |
44 |
|
|
58 |
|
|
59 |
=head2 tag |
=head2 tag |
60 |
|
|
61 |
Define new tag for output |
Define new tag for I<search> and I<display>. |
62 |
|
|
63 |
tag('Title', rec('200','a') ); |
tag('Title', rec('200','a') ); |
64 |
|
|
|
By default, output will go into I<search> and I<display>. |
|
65 |
|
|
66 |
=cut |
=cut |
67 |
|
|
228 |
|
|
229 |
sub prefix { |
sub prefix { |
230 |
my $p = shift or die "prefix needs string as first argument"; |
my $p = shift or die "prefix needs string as first argument"; |
231 |
return map { $p . $_ } @_; |
return map { $p . $_ } grep { defined($_) } @_; |
232 |
} |
} |
233 |
|
|
234 |
=head2 first |
=head2 first |