/[webpac2]/trunk/lib/WebPAC/Normalize/Set.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/Set.pm

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

revision 466 by dpavlin, Fri May 12 21:46:28 2006 UTC revision 467 by dpavlin, Sat May 13 09:48:06 2006 UTC
# Line 30  our $VERSION = '0.03'; Line 30  our $VERSION = '0.03';
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    
# Line 50  sub set_rec { Line 58  sub set_rec {
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    
# Line 221  Prefix all values with a string Line 228  Prefix all values with a string
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

Legend:
Removed from v.466  
changed lines
  Added in v.467

  ViewVC Help
Powered by ViewVC 1.1.26