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

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

revision 983 by dpavlin, Sun Nov 4 11:12:38 2007 UTC revision 1011 by dpavlin, Tue Nov 6 20:26:31 2007 UTC
# Line 2  package WebPAC::Normalize; Line 2  package WebPAC::Normalize;
2  use Exporter 'import';  use Exporter 'import';
3  our @EXPORT = qw/  our @EXPORT = qw/
4          _set_ds _set_lookup          _set_ds _set_lookup
         get_ds  
5          _set_load_row          _set_load_row
6          _get_ds _clean_ds          _get_ds _clean_ds
7          _debug          _debug
# Line 106  sub data_structure { Line 105  sub data_structure {
105          die "need row argument" unless ($arg->{row});          die "need row argument" unless ($arg->{row});
106          die "need normalisation argument" unless ($arg->{rules});          die "need normalisation argument" unless ($arg->{rules});
107    
         no strict 'subs';  
108          _set_lookup( $arg->{lookup} ) if defined($arg->{lookup});          _set_lookup( $arg->{lookup} ) if defined($arg->{lookup});
109          _set_ds( $arg->{row} );          _set_ds( $arg->{row} );
110          _set_config( $arg->{config} ) if defined($arg->{config});          _set_config( $arg->{config} ) if defined($arg->{config});
111          _clean_ds( %{ $arg } );          _clean_ds( %{ $arg } );
112          $load_row_coderef = $arg->{load_row_coderef};          $load_row_coderef = $arg->{load_row_coderef};
113    
114          eval "$arg->{rules}";          no strict 'subs';
115            no warnings 'redefine';
116            eval "$arg->{rules};";
117          die "error evaling $arg->{rules}: $@\n" if ($@);          die "error evaling $arg->{rules}: $@\n" if ($@);
118    
119          return _get_ds();          return _get_ds();
# Line 133  sub _set_ds { Line 133  sub _set_ds {
133          $rec = shift or die "no record hash";          $rec = shift or die "no record hash";
134  }  }
135    
 =head2 get_ds  
   
 Access to original record from input module  
   
   my $ds = get_rec;  
   
 =cut  
   
 sub get_ds {  
         return $rec;  
 }  
   
136  =head2 _set_config  =head2 _set_config
137    
138  Set current config hash  Set current config hash

Legend:
Removed from v.983  
changed lines
  Added in v.1011

  ViewVC Help
Powered by ViewVC 1.1.26