/[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 1204 by dpavlin, Sun Oct 26 15:57:37 2008 UTC revision 1205 by dpavlin, Fri May 29 20:32:13 2009 UTC
# Line 150  sub _set_ds { Line 150  sub _set_ds {
150    
151  sub _get_rec { $rec };  sub _get_rec { $rec };
152    
153    sub rec_array {
154            my $d = $rec->{ $_[0] };
155            return @$d if ref($d) eq 'ARRAY';
156            die "field $_[0] not array: ",dump( $d );
157    }
158    
159  =head2 _set_config  =head2 _set_config
160    
161  Set current config hash  Set current config hash
# Line 346  Insert into lists which will be automati Line 352  Insert into lists which will be automati
352    
353  sub sorted { to( 'sorted', @_ ) }  sub sorted { to( 'sorted', @_ ) }
354    
355    =head2 row
356    
357    Insert new row of data into output module
358    
359      row( column => 'foo', column2 => 'bar' );
360    
361    =cut
362    
363    use Data::Dump qw/dump/;
364    
365    sub row {
366            die "array doesn't have even number of elements but $#_: ",dump( @_ ) if $#_ % 2 != 1;
367    
368            push @{ $out->{'_rows'} }, {@_};
369    }
370    
371    
372  =head1 Functions to extract data from input  =head1 Functions to extract data from input
373    

Legend:
Removed from v.1204  
changed lines
  Added in v.1205

  ViewVC Help
Powered by ViewVC 1.1.26